shellcheck, better automated upgrades
[distro-setup] / install-my-scripts
index fc6123970693d388161980e2354dc44f5287d28f..0e36a4f86ec8f91db051b49f9c34cc115fc50a37 100755 (executable)
@@ -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