X-Git-Url: https://iankelling.org/git/?a=blobdiff_plain;f=install-my-scripts;h=0e36a4f86ec8f91db051b49f9c34cc115fc50a37;hb=8452f3f3e0b837ba4e616e062787d726d7888b76;hp=3025d84f8af80d7e9b7e439d4db8f417e70224ab;hpb=0cc08a73110c15c4e7bbb8c8233a6c122c27490e;p=distro-setup diff --git a/install-my-scripts b/install-my-scripts index 3025d84..0e36a4f 100755 --- a/install-my-scripts +++ b/install-my-scripts @@ -23,12 +23,12 @@ 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 -e() { echo "$*"; "$@"; } - # scripts that would interfere with unmounting /a, put them elsewhere -e install /a/bin/log-quiet/log-once btrbk-run mount-latest-subvol check-subvol-stale /usr/local/bin +install /a/bin/log-quiet/log-once switch-mail-host btrbk-run mount-latest-subvol \ + check-subvol-stale /usr/local/bin +install /a/bin/errhandle/err /usr/local/lib