From: Ian Kelling Date: Mon, 18 Dec 2023 21:02:51 +0000 (-0500) Subject: make dependency require manual install X-Git-Url: https://iankelling.org/git/?a=commitdiff_plain;h=e8a09e0816f17de27453105109ebcc91e5f01c58;p=newns make dependency require manual install --- diff --git a/newns b/newns index 2290629..315c786 100755 --- a/newns +++ b/newns @@ -16,20 +16,9 @@ [[ $EUID == 0 ]] || exec sudo -E "$BASH_SOURCE" "$@" -tmp="$(readlink -f "${BASH_SOURCE}")"; script_dir="${tmp%/*}" -if [[ ! $ERRHANDLE_PATH ]]; then - ERRHANDLE_PATH="$script_dir"/../errhandle/err -fi -if [[ -s $ERRHANDLE_PATH ]]; then - source $ERRHANDLE_PATH -else - cd "$script_dir" - if ! wget -O err 'https://iankelling.org/git/?p=errhandle;a=blob_plain;f=err;hb=HEAD'; then - echo "$0: failed to get errhandle dependency" >&2 - exit 1 - fi - source err -fi +# https://savannah.nongnu.org/projects/bash-bear-trap/ +set -e; . /usr/local/lib/bash-bear; set +e + usage() { cat <