Improved the feed-back.
authorFrancois Fleuret <francois@fleuret.org>
Wed, 27 Sep 2017 07:13:32 +0000 (09:13 +0200)
committerFrancois Fleuret <francois@fleuret.org>
Wed, 27 Sep 2017 07:13:32 +0000 (09:13 +0200)
xremote.sh

index d425792..2952bd2 100755 (executable)
@@ -108,7 +108,8 @@ do
 
             SEND)
                 check_remote_is_defined
-                tar c ${value} | ssh "${REMOTE_HOST}" "cd \"${REMOTE_DIR}\" && tar mx"
+                echo "xremote: -- sending files --------------------------------------------"
+                tar c ${value} | ssh "${REMOTE_HOST}" "cd \"${REMOTE_DIR}\" && tar mxv"
                 ;;
 
             HOST)
@@ -117,6 +118,7 @@ do
                 [[ "${REMOTE_HOST}" ]] || REMOTE_HOST="${XREMOTE_HOST}"
                 [[ "${REMOTE_HOST}" ]] || (echo "xremote: No remote host specified." >&2 && exit 1)
                 REMOTE_DIR="$(ssh </dev/null "${REMOTE_HOST}" mktemp -d /tmp/xremote.from_"$(hostname)_$(date +%Y%m%d-%H%M%S)".XXXXXX)"
+                echo "xremote: target is ${REMOTE_HOST}"
                 ;;
         esac
     fi
@@ -129,7 +131,7 @@ check_remote_is_defined
 
 tar c "${main}" | ssh "${REMOTE_HOST}" "cd \"${REMOTE_DIR}\" && tar mx"
 
-echo "xremote: on ${REMOTE_HOST}"
+echo "xremote: -- running the executable -----------------------------------"
 
 if [[ "${REMOTE_EXEC}" ]]
 then
@@ -138,14 +140,13 @@ else
     REMOTE_COMMAND="./${main}"
 fi
 
-echo "xremote: -- stdout ---------------------------------------------------"
 ssh </dev/null "${REMOTE_HOST}" "cd \"${REMOTE_DIR}\" && ${REMOTE_COMMAND}"
 
 ######################################################################
 
 # Disable globbing to keep wildcards for the remote side
 
-echo "xremote: -- retrieve results -----------------------------------------"
+echo "xremote: -- retrieving files -----------------------------------------"
 
 set -f