# SPDX-License-Identifier: GPL-3.0-or-later
# SPDX-License-Identifier: Apache-2.0
-if ! test "$BASH_VERSION"; then echo "error: shell is not bash" >&2; exit 1; fi
-shopt -s inherit_errexit 2>/dev/null ||: # ignore fail in bash < 4.4
-set -eE -o pipefail
-trap 'echo "$0:$LINENO:error: \"$BASH_COMMAND\" exit status: $?, PIPESTATUS: ${PIPESTATUS[*]}" >&2' ERR
-# alternatively, using https://iankelling.org/git/?p=errhandle;a=tree
-# source /path/errhandle/err
-# on my machine
-source /a/bin/errhandle/err
+source /a/bin/bash-bear-trap/bash-bear
[[ $EUID == 0 ]] || exec sudo -E "${BASH_SOURCE[0]}" "$@"