commit 92aca81f5528fe453c8da9dda92c5bf27f706572 parent 31472da6fc412eb26c5ba6f80487be2b332909da Author: Hiltjo Posthuma <hiltjo@codemadness.org> Date: Sat, 11 Aug 2018 12:21:06 +0200 remove unnecessary cat for executing the host script Diffstat:
M | drist | | | 11 | +++++------ |
1 file changed, 5 insertions(+), 6 deletions(-)
diff --git a/drist b/drist @@ -34,12 +34,11 @@ remote_script() { if [ -f "${1}" ] then printf 'Executing script\n' - cat "${1}" | \ - ssh "${2}" 'DRIST=$(mktemp /tmp/drist.XXXXXXXXXXXX) && - cat - > "$DRIST" && - chmod u+x "$DRIST" && - "$DRIST" ; - rm "$DRIST"' + ssh "${2}" 'DRIST=$(mktemp /tmp/drist.XXXXXXXXXXXX) && + cat - > "$DRIST" && + chmod u+x "$DRIST" && + "$DRIST" ; + rm "$DRIST"' < "$1" fi }