X-Git-Url: https://iankelling.org/git/?a=blobdiff_plain;f=btrbk-run;h=3e610de01b7f9fe7fc1632b1c99e2172a5ced95c;hb=1a9542b37443a84e55e175db8ddef4e99f434fb5;hp=7dad03a5c270284b455397c1c76726d2786ce3ed;hpb=1059b8ac11f567b9a8eec1e34a7ab6e791721dca;p=distro-setup diff --git a/btrbk-run b/btrbk-run index 7dad03a..3e610de 100644 --- a/btrbk-run +++ b/btrbk-run @@ -17,7 +17,7 @@ # todo: if we cancel in the middle of a btrfs send, then run again immediately, the received subvolume doesn't get a Received UUID: field, and we won't mount it. Need to figure out a solution that will fix this. -[[ $EUID == 0 ]] || exec sudo -E "$BASH_SOURCE" "$@" +[[ $EUID == 0 ]] || exec sudo -E "${BASH_SOURCE[0]}" "$@" source /usr/local/lib/err @@ -44,7 +44,7 @@ rsync-dirs() { pre="${0##*/}: " m() { if $verbose; then printf "$pre%s\n" "$*"; fi; "$@"; } -e() { printf "$pre%s\n" "$*"; "$@"; } +e() { printf "$pre%s\n" "$*"; } die() { printf "$pre%s\n" "$*" >&2; exit 1; } # latest $MAIL_HOST @@ -125,7 +125,7 @@ if [[ -v targets && $source ]]; then fi if $verbose; then - e "options: conf_only=%s\ndry_run=%s\nrate_limit=%s\nverbose=%s\ncmd_arg=%s" "$conf_only" "$dry_run" "$rate_limit" "$verbose" "$cmd_arg" + printf "options: conf_only=%s\ndry_run=%s\nrate_limit=%s\nverbose=%s\ncmd_arg=%s" "$conf_only" "$dry_run" "$rate_limit" "$verbose" "$cmd_arg" fi ### end options parsing