X-Git-Url: https://iankelling.org/git/?a=blobdiff_plain;f=btrbk-run;h=5ce774b7e83c84270ad228479e5ba7b0f1901c40;hb=0f9a999aa601cd77343a3e08cf0c6c4f9f943813;hp=18eca15d4dfa4518a54f0ab3f0112e40c0b60206;hpb=c300392f92092b3a89281df462d42710f25d0351;p=distro-setup diff --git a/btrbk-run b/btrbk-run index 18eca15..5ce774b 100644 --- a/btrbk-run +++ b/btrbk-run @@ -22,7 +22,7 @@ [[ $EUID == 0 ]] || exec sudo -E "${BASH_SOURCE[0]}" "$@" -source /usr/local/lib/err +set -e; . /usr/local/lib/bash-bear; set +e usage() { cat <<'EOF' @@ -259,7 +259,7 @@ if ! $force && { $check_installed || [[ ! $source ]]; } ; then uninstalled-file-die $f fi done - if ! diff -q /a/bin/errhandle/err /usr/local/lib/err; then + if ! diff -q /a/bin/bash-bear-trap/bash-bear /usr/local/lib/bash-bear; then uninstalled-file-die err fi if $check_installed; then @@ -502,7 +502,7 @@ done if ! $pull_reexec && [[ $source ]] && $pulla ; then tmpf=$(mktemp) m rsync -ra $source:/usr/local/bin/{mount-latest-subvol,check-subvol-stale} /usr/local/bin - m rsync -ra $source:/usr/local/lib/err /usr/local/lib + m rsync -ra $source:/usr/local/lib/bash-bear /usr/local/lib m scp $source:/a/bin/distro-setup/btrbk-run $tmpf if ! diff -q $tmpf ${BASH_SOURCE[0]}; then e "found different version on host $source. reexecing" @@ -842,11 +842,11 @@ if [[ $ret == 0 ]]; then if [[ $h == kd && $HOSTNAME == x3 && $HOSTNAME == "$MAIL_HOST" ]]; then m ssh root@$tg 'btrbk-spread-wrap &>/dev/null