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)
[[ "${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
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
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