From 917a82f8c945c0c2ee4f1d4664d510f0adad47c0 Mon Sep 17 00:00:00 2001 From: Francois Fleuret Date: Sat, 15 Sep 2018 13:13:51 +0200 Subject: [PATCH] OCD cosmetics. --- xremote.sh | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) 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 -- 2.39.5