@XREMOTE_GET: *.dat
@XREMOTE_PRE: ln -s /home/fleuret/data/pytorch ./data
+ If a file with the same name as the script with the .xremote
+ extension appended to it exists, arguments will be read from it by
+ default.
+
If the -h option is provided @XREMOTE_HOST is ignored.
If the -i option is provided, all the files are installed and
######################################################################
-[[ -a "$1" ]] || (help && exit 1)
+[[ -a "$1" ]] || (help && echo >&2 "Cannot find $1" && exit 1)
+
+cd "$(dirname "$1")"
main="$(basename "$1")"
+main_config="${main}.xremote"
-cd "$(dirname "$1")"
+if [[ -f "${main_config}" ]]
+then
+ echo "xremote: found ${main_config}"
+else
+ main_config="${main}"
+fi
shift
esac
fi
-done < "${main}"
+done < "${main_config}"
######################################################################
######################################################################
# I find this slightly ugly ...
+
for s in "$@"
do
quoted_args="${quoted_args} \"${s}\""
;;
esac
fi
-done < "${main}"
+
+done < "${main_config}"
set +f