X-Git-Url: https://iankelling.org/git/?p=distro-setup;a=blobdiff_plain;f=install-my-scripts;h=63084ee0cc0bb618547ed8ba5f2c0d201932c9ba;hp=2f9e22410c808b9357836749246bc11a9ff9eb1c;hb=79b274fcd8bfa556133ab13270e84b40aebe8468;hpb=90bd397922e7240c41377e7404f79f190bfbc9d8 diff --git a/install-my-scripts b/install-my-scripts index 2f9e224..63084ee 100755 --- a/install-my-scripts +++ b/install-my-scripts @@ -23,12 +23,17 @@ 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 btrbk-run mount-latest-subvol check-subvol-stale /usr/local/bin +# scripts that would interfere with unmounting /a, put them elsewhere. +# note: previously used the install command, but it had this habit of +# like, once a month or so the files would be "not found" by a script +# trying to use them, within a few minute of the last time this +# ran. Very strange, dunno why, but rsync won't do anything unless these +# changed, so that should fix it. +rsync -t --chmod=755 --chown=root:root /a/bin/log-quiet/log-once switch-mail-host btrbk-run mount-latest-subvol \ + check-subvol-stale /usr/local/bin +rsync -t --chmod=755 --chown=root:root /a/bin/errhandle/err /usr/local/lib