From e8a09e0816f17de27453105109ebcc91e5f01c58 Mon Sep 17 00:00:00 2001 From: Ian Kelling Date: Mon, 18 Dec 2023 16:02:51 -0500 Subject: [PATCH] make dependency require manual install --- newns | 27 ++++++--------------------- 1 file changed, 6 insertions(+), 21 deletions(-) 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 <