X-Git-Url: https://www.fleuret.org/cgi-bin/gitweb/gitweb.cgi?p=xremote.git;a=blobdiff_plain;f=xremote.sh;fp=xremote.sh;h=ecc14734b5bdd85a90474416d523c740b7065b6f;hp=9b753e09a61d7cbcb0cd6257e18b19fe099b0cd7;hb=1f50a9e21aef6486ab283ce785f7eff8267834a1;hpb=703eb6f5d8da6f38c1c57a2c861177098384087c diff --git a/xremote.sh b/xremote.sh index 9b753e0..ecc1473 100755 --- a/xremote.sh +++ b/xremote.sh @@ -54,7 +54,10 @@ xremote.sh @XREMOTE_GET: *.dat @XREMOTE_PRE: ln -s /home/fleuret/data/pytorch ./data - Contact for comments. + If no argument is provided to @XREMOTE_HOST, the environment + variable $XREMOTE_HOST is used instead + + Contact for comments. EOF return 0 @@ -103,8 +106,9 @@ do 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