@XREMOTE_GET: *.dat
@XREMOTE_PRE: ln -s /home/fleuret/data/pytorch ./data
- Contact <francois@fleuret.org> for comments.
+ If no argument is provided to @XREMOTE_HOST, the environment
+ variable $XREMOTE_HOST is used instead
+
+ Contact <francois@fleuret.org> for comments.
EOF
return 0
HOST)
[[ "${REMOTE_DIR}" ]] && (exit "Remote host already defined!" >&2 && exit 1)
- cleanup_remote_tmp
- REMOTE_HOST=${value}
+ REMOTE_HOST="${value}"
+ [[ "${REMOTE_HOST}" ]] || REMOTE_HOST="${XREMOTE_HOST}"
+ [[ "${REMOTE_HOST}" ]] || (echo "No remote host specified." >&2 && exit 1)
REMOTE_DIR="$(ssh </dev/null "${REMOTE_HOST}" mktemp -d /tmp/xremote.from_"$(hostname)_$(date +%Y%m%d)".XXXXXX)"
;;
esac