From: Francois Fleuret Date: Sat, 15 Sep 2018 11:13:51 +0000 (+0200) Subject: OCD cosmetics. X-Git-Url: https://fleuret.org/cgi-bin/gitweb/gitweb.cgi?a=commitdiff_plain;h=917a82f8c945c0c2ee4f1d4664d510f0adad47c0;p=xremote.git OCD cosmetics. --- diff --git a/xremote.sh b/xremote.sh index ecf6f3e..5536d01 100755 --- a/xremote.sh +++ b/xremote.sh @@ -111,18 +111,20 @@ done ###################################################################### -[[ -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" -if [[ ! -f "${main}.xremote" ]] +if [[ -f "${main_config}" ]] then + echo "xremote: found ${main_config}" +else main_config="${main}" fi -cd "$(dirname "$1")" - shift trap cleanup_remote_tmp EXIT @@ -202,6 +204,7 @@ fi ###################################################################### # I find this slightly ugly ... + for s in "$@" do quoted_args="${quoted_args} \"${s}\"" @@ -236,6 +239,7 @@ do ;; esac fi + done < "${main_config}" set +f