X-Git-Url: https://iankelling.org/git/?p=distro-setup;a=blobdiff_plain;f=install-my-scripts;h=0e36a4f86ec8f91db051b49f9c34cc115fc50a37;hp=fc6123970693d388161980e2354dc44f5287d28f;hb=343a048be4b32d18540c6531048d2b9a006774ae;hpb=50e3ebaf4941651899a3b52b5245052c3f4ed725 diff --git a/install-my-scripts b/install-my-scripts index fc61239..0e36a4f 100755 --- a/install-my-scripts +++ b/install-my-scripts @@ -23,9 +23,9 @@ set -eE -o pipefail trap 'echo "$0:$LINENO:error: \"$BASH_COMMAND\" returned $?" >&2' ERR -[[ $EUID == 0 ]] || exec sudo -E "$BASH_SOURCE" "$@" +[[ $EUID == 0 ]] || exec sudo -E "${BASH_SOURCE[0]}" "$@" -x="$(readlink -f "$BASH_SOURCE")"; cd ${x%/*} +x="$(readlink -f -- "${BASH_SOURCE[0]}")"; cd ${x%/*} # directory of this file # scripts that would interfere with unmounting /a, put them elsewhere