From 51c8b40fd2aac71d29dc9298ca65425725ad1edd Mon Sep 17 00:00:00 2001 From: Ian Kelling Date: Mon, 18 Dec 2023 16:01:42 -0500 Subject: [PATCH] rename err to bash-bear --- brc | 49 +++++++++++++++---- brc2 | 63 ++++++++++++++++++------- btrbk-run | 6 +-- btrbkr2 | 9 +--- btrfsmaint | 2 +- check-radicale | 2 +- check-remote-mailqs | 2 +- check-subvol-stale | 2 +- conflink | 2 +- distro-begin | 2 +- distro-end | 2 +- dynamic-ip-update | 2 +- filesystem/usr/local/bin/myupgrade | 2 +- filesystem/usr/local/bin/myupgrade-iank | 2 +- fixvpndns | 2 +- gen-amy-fstab | 5 +- gitslink | 2 +- laptop-xrandr | 2 +- mail-route | 2 +- mail-setup | 10 ++-- mailclean | 2 +- mailtest-check | 2 +- mount-latest-remote | 4 +- mount-latest-subvol | 2 +- myi3status | 2 +- nav2beet | 2 +- nav2beet-local | 2 +- nextcloud-setup | 6 +-- primary-setup | 2 +- prof | 2 +- prof-backup | 2 +- prof-notify | 2 +- prof-remote | 2 +- prof-tail | 2 +- script-files | 2 +- sl/.iank/bash-bear | 1 + sl/.iank/err | 1 - sound-alert | 2 +- switch-mail-host | 4 +- system-status | 2 +- trusted-network | 2 +- zboot | 2 +- ziva-backup-check | 2 +- ziva-screen | 2 +- 44 files changed, 137 insertions(+), 87 deletions(-) create mode 120000 sl/.iank/bash-bear delete mode 120000 sl/.iank/err diff --git a/brc b/brc index 742dcee..5aff8e0 100644 --- a/brc +++ b/brc @@ -7,15 +7,15 @@ # so this can set extdebug and avoid the bash debugger. -if [[ -s /a/bin/errhandle/err ]]; then - # shellcheck source=/a/bin/errhandle/err - source /a/bin/errhandle/err +if [[ -s /a/bin/bash-bear-trap/bash-bear ]]; then + # shellcheck source=/a/bin/bash-bear-trap/bash-bear + source /a/bin/bash-bear-trap/bash-bear # wtf, shellcheck doesn't allow disabling warnings in elifs else # bleh shellcheck can't handle disabling in an elif, so nesting this if. # shellcheck disable=SC2154 # set in .bashrc if [[ -s $bashrc_dir/err ]]; then - # shellcheck source=/a/bin/errhandle/err + # shellcheck source=/a/bin/bash-bear-trap/bash-bear source $bashrc_dir/err fi fi @@ -282,8 +282,8 @@ fi # bash: /usr/share/bashdb/bashdb-main.inc: No such file or directory # bash: warning: cannot start debugger; debugging mode disabled if [[ $SOE ]]; then - if [[ -e /a/bin/errhandle/err ]]; then - source /a/bin/errhandle/err + if [[ -e /a/bin/bash-bear-trap/bash-bear ]]; then + source /a/bin/bash-bear-trap/bash-bear fi fi @@ -561,6 +561,21 @@ bl() { fi done } +# like running cl a +cla() { + local line + mapfile -t lines <~/.cdirs + start=$(( ${#lines[@]} - 1 )) + for (( j=start; j >= 0; j-- )); do + line="${lines[$j]}" + if [[ ! $line || ! -d "$line" || $line == "$PWD" || line == "$HOME" ]]; then + continue + fi + e "$line" + c "$line" + break + done +} ## END functions to change directory better than cd ## # pee do. run args as a command with output copied to syslog. @@ -818,15 +833,15 @@ cf() { caf() { local file -find -L "$@" -type f -not \( -name .svn -prune -o -name .git -prune \ + find -L "$@" -type f -not \( -name .svn -prune -o -name .git -prune \ -o -name .hg -prune -o -name .editor-backups -prune \ -o -name .undo-tree-history -prune \) -printf '%h\0%d\0%p\n' | sort -t '\0' -n \ - | awk -F '\0' '{print $3}' 2>/dev/null | while read -r file; do + | awk -F '\0' '{print $3}' 2>/dev/null | while read -r file; do hr printf "%s\n" "$file" hr cat "$file" -done + done } ccomp cat cf caf @@ -840,7 +855,7 @@ clc() { cx() { chmod +X "$@" - } +} cam() { git commit -am "$*" @@ -1436,6 +1451,18 @@ g() { fi } +# g pipe. like: cmd | emacs. save cmd output to tmp file, then edit. +gp() { + cat &>/a/tmp/gtmp + g "$@" /a/tmp/gtmp + } + +# like cmd &> tempfile; emacs tempfile +gc() { + "$@" &> /a/tmp/gtmp + g /a/tmp/gtmp + } + # force terminal version gn() { g -n "$@" @@ -2030,6 +2057,8 @@ sedi() { sed -i --follow-symlinks "$@" } + + rmstrips() { ssh fencepost head -n 300 /gd/gnuorg/EventAndTravelInfo/rms-current-trips.txt | less } diff --git a/brc2 b/brc2 index 3f62206..af4d808 100644 --- a/brc2 +++ b/brc2 @@ -439,22 +439,19 @@ astudio() { # Convert brains file path to url and vice versa # usage: brains [URL_OR_PATH] brains() { - _iki-convert '(/a)?/f/brains' brains.fsf.org/wiki "$@" + _iki-convert brains.fsf.org/wiki "$@" } glue() { - _iki-convert '(/a)?/f/gluestick' gluestick.office.fsf.org "$@" + _iki-convert gluestick.office.fsf.org "$@" } -# usage: $0 REPO_PATH [URL_OR_PATH] +# usage: see above _iki-convert() { - local url prefix path input err repo_dir dir url_dir url - repo_dir="$1" - prefix="$2" - shift 2 - err=false - if $err; then - return 1 - fi + local url url_prefix path input err repo_dir dir url_dir url name + url_prefix="$1" + name="${url_prefix%%.*}" + repo_dir="/f/$name" + shift if [[ $1 ]]; then input="$*" else @@ -462,7 +459,7 @@ _iki-convert() { fi case $input in http*) - path="$repo_dir/${input##http*://"$prefix"/}" + path="$repo_dir/${input##http*://"$url_prefix"/}" if [[ $path == */ ]]; then path=${path%/}.mdwn fi @@ -470,8 +467,8 @@ _iki-convert() { ;; *) path=$(fp "$input") - url_dir=$(echo "$path" | sed -r "s,^$repo_dir/,,") - url="https://$prefix/$url_dir" + url_dir=$(echo "$path" | sed -r "s,^(/a)?$repo_dir/,,") + url="https://$url_prefix/$url_dir" url="${url%.mdwn}/" j echo "$url" ;; @@ -744,7 +741,7 @@ mpvrpc-percent-pos() { # q quit # ret next # -beetag() { +beetag() { local last_genre_i fstring tag id char new_item char_i genre tag remove doplay i j random path local do_rare_genres read_wait help line lsout tmp ls_line skip_lookback local escape_char escaped_input expected_input skip_input_regex right_pad erasable_line seek_sec @@ -2982,6 +2979,35 @@ prof-recent-local() { done } +prof-sort() { + case $HOSTNAME in + kd) + prof-recent-sort + ;; + *) + ssh b8.nz prof-recent-sort + ;; + esac +} + +prof-recent-sort() { + local d dates date files f + # consider making the day count passed by parameter. note: this works: $(date -d '2 day ago' +%Y_%m_%d) + dates=("$(date +%Y_%m_%d)" "$(date -d '1 day ago' +%Y_%m_%d)" ) + files=() + for d in /d/p/profanity/chatlogs/iank_at_fsf.org/!(rooms); do + for date in ${dates[@]}; do + f=$d/$date.log + if [[ -e $f ]]; then + files+=($f) + fi + done + done + for f in "${files[@]}"; do + sed "s/\$/ $f/" $f + done | sort +} + # usage: debvm DEBIAN_VERSION RAM_MB debvm() { @@ -4062,13 +4088,18 @@ fi # rg with respecting vcs ignore files rgv() { ret=0 + # settings that are turned off for pipes, keep them on. + # Found by searching for "terminal" in --help + # --heading + # -n + # # -. = search dotfiles # -z = search zipped files # -i = case insensitive # -M = max columns # --no-messages because of annoying errors on broken symlinks # --no-ignore-parent because i have /a/.git which ignores almost everything under it. - command rg -. -z --no-messages -i -M 900 --no-ignore-parent -g '!.git' -g '!auto-save-list' -g '!.savehist' "$@" || ret=$? + command rg -n --heading -. -z --no-messages -i -M 900 --no-ignore-parent -g '!.git' -g '!auto-save-list' -g '!.savehist' "$@" || ret=$? return $ret } diff --git a/btrbk-run b/btrbk-run index c4d8461..bf51178 100644 --- a/btrbk-run +++ b/btrbk-run @@ -22,7 +22,7 @@ [[ $EUID == 0 ]] || exec sudo -E "${BASH_SOURCE[0]}" "$@" -source /usr/local/lib/err +source /usr/local/lib/bash-bear 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" diff --git a/btrbkr2 b/btrbkr2 index 321948c..f306d39 100755 --- a/btrbkr2 +++ b/btrbkr2 @@ -4,14 +4,7 @@ # 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]}" "$@" diff --git a/btrfsmaint b/btrfsmaint index 0a36d05..c35004e 100755 --- a/btrfsmaint +++ b/btrfsmaint @@ -3,7 +3,7 @@ [[ $EUID == 0 ]] || exec sudo -E "${BASH_SOURCE[0]}" "$@" -set -e; . /usr/local/lib/err; set +e +set -e; . /usr/local/lib/bash-bear; set +e # inspired from # https://github.com/kdave/btrfsmaintenance diff --git a/check-radicale b/check-radicale index bf0729c..99599a5 100755 --- a/check-radicale +++ b/check-radicale @@ -1,7 +1,7 @@ #!/bin/bash if [ -z "$BASH_VERSION" ]; then echo "error: shell is not bash" >&2; exit 1; fi -source /a/bin/errhandle/err +source /a/bin/bash-bear-trap/bash-bear source /a/bin/bash_unpublished/source-state if [[ $HOSTNAME != "$MAIL_HOST" ]]; then diff --git a/check-remote-mailqs b/check-remote-mailqs index fa3dbf8..047e8b7 100755 --- a/check-remote-mailqs +++ b/check-remote-mailqs @@ -4,7 +4,7 @@ if [ -z "$BASH_VERSION" ]; then echo "error: shell is not bash" >&2; exit 1; fi -source /a/bin/errhandle/err +source /a/bin/bash-bear-trap/bash-bear shopt -s nullglob shopt -s dotglob diff --git a/check-subvol-stale b/check-subvol-stale index fbd31d6..5ae7cb6 100644 --- a/check-subvol-stale +++ b/check-subvol-stale @@ -16,7 +16,7 @@ [[ $EUID == 0 ]] || exec sudo -E "${BASH_SOURCE[0]}" "$@" -source /usr/local/lib/err +source /usr/local/lib/bash-bear shopt -s nullglob diff --git a/conflink b/conflink index 8550143..d661e17 100755 --- a/conflink +++ b/conflink @@ -1,6 +1,6 @@ #!/bin/bash -source /a/bin/errhandle/err +source /a/bin/bash-bear-trap/bash-bear err-cleanup() { echo 1 >~/.local/conflink } diff --git a/distro-begin b/distro-begin index c5d10cc..4104e00 100755 --- a/distro-begin +++ b/distro-begin @@ -59,7 +59,7 @@ interactive=true # set this to false to force set -x if ! $interactive; then set -x fi -source /a/bin/errhandle/err +source /a/bin/bash-bear-trap/bash-bear mkdir -p ~/.local err-cleanup() { diff --git a/distro-end b/distro-end index f2eef43..5ba9421 100755 --- a/distro-end +++ b/distro-end @@ -6,7 +6,7 @@ export LC_USEBASHRC=t; if [[ -s ~/.bashrc ]]; then . ~/.bashrc; fi ### setup -source /a/bin/errhandle/err +source /a/bin/bash-bear-trap/bash-bear src="$(readlink -f -- "${BASH_SOURCE[0]}")"; src=${src%/*} # directory of this file if [[ $EUID == 0 ]]; then diff --git a/dynamic-ip-update b/dynamic-ip-update index ccfe2be..6c12ccb 100755 --- a/dynamic-ip-update +++ b/dynamic-ip-update @@ -1,6 +1,6 @@ #!/bin/bash -set -e; . /usr/local/lib/err; set +e +set -e; . /usr/local/lib/bash-bear; set +e [[ $EUID == 0 ]] || exec sudo -E "${BASH_SOURCE[0]}" "$@" this_file="$(readlink -f -- "${BASH_SOURCE[0]}")" diff --git a/filesystem/usr/local/bin/myupgrade b/filesystem/usr/local/bin/myupgrade index 939bb6e..6c4ed87 100755 --- a/filesystem/usr/local/bin/myupgrade +++ b/filesystem/usr/local/bin/myupgrade @@ -9,7 +9,7 @@ if [ -z "$BASH_VERSION" ]; then echo "error: shell is not bash" >&2; exit 1; fi -source /usr/local/lib/err +source /usr/local/lib/bash-bear pre="${0##*/}:" PATH="/sbin:$PATH" m() { printf "$pre %s\n" "$*"; "$@"; } diff --git a/filesystem/usr/local/bin/myupgrade-iank b/filesystem/usr/local/bin/myupgrade-iank index e93d63e..b4cd1a4 100755 --- a/filesystem/usr/local/bin/myupgrade-iank +++ b/filesystem/usr/local/bin/myupgrade-iank @@ -4,7 +4,7 @@ if [ -z "$BASH_VERSION" ]; then echo "error: shell is not bash" >&2; exit 1; fi -source /usr/local/lib/err +source /usr/local/lib/bash-bear pre="${0##*/}:" m() { printf "$pre %s\n" "$*"; "$@"; } e() { printf "$pre %s\n" "$*"; } diff --git a/fixvpndns b/fixvpndns index 0619293..a97b2bd 100755 --- a/fixvpndns +++ b/fixvpndns @@ -1,7 +1,7 @@ #!/bin/bash # Copyright (C) 2019 Ian Kelling # SPDX-License-Identifier: AGPL-3.0-or-later -source /a/bin/errhandle/err +source /a/bin/bash-bear-trap/bash-bear resolvuid=$(id -u systemd-resolve) case $EUID in diff --git a/gen-amy-fstab b/gen-amy-fstab index 2c2c91a..4564697 100755 --- a/gen-amy-fstab +++ b/gen-amy-fstab @@ -6,10 +6,7 @@ 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]}" "$@" diff --git a/gitslink b/gitslink index e4b39dc..f44f213 100755 --- a/gitslink +++ b/gitslink @@ -1,6 +1,6 @@ #!/bin/bash -source /a/bin/errhandle/err +source /a/bin/bash-bear-trap/bash-bear e() { echo "$*"; "$@"; } lnf() { /a/bin/lnf/lnf "$@"; } diff --git a/laptop-xrandr b/laptop-xrandr index ce5ab36..a28600c 100755 --- a/laptop-xrandr +++ b/laptop-xrandr @@ -1,5 +1,5 @@ #!/bin/bash -set -e; . /usr/local/lib/err; set +e +set -e; . /usr/local/lib/bash-bear; set +e output=HDMI2 diff --git a/mail-route b/mail-route index 0f10d28..582438b 100755 --- a/mail-route +++ b/mail-route @@ -17,7 +17,7 @@ #set -x #exec &> >(logger) -source /a/bin/errhandle/err +source /a/bin/bash-bear-trap/bash-bear usage() { cat <<'EOF' diff --git a/mail-setup b/mail-setup index e2d02f6..e2f7b21 100755 --- a/mail-setup +++ b/mail-setup @@ -183,10 +183,10 @@ if [ -z "$BASH_VERSION" ]; then echo "error: shell is not bash" >&2; exit 1; fi shopt -s nullglob -if [[ -s /usr/local/lib/err ]]; then - source /usr/local/lib/err -elif [[ -s /a/bin/errhandle/err ]]; then - source /a/bin/errhandle/err +if [[ -s /usr/local/lib/bash-bear ]]; then + source /usr/local/lib/bash-bear +elif [[ -s /a/bin/bash-bear-trap/bash-bear ]]; then + source /a/bin/bash-bear-trap/bash-bear else echo "no err tracing script found" exit 1 @@ -2748,7 +2748,7 @@ EOF u /usr/local/bin/ncup <<'EOFOUTER' #!/bin/bash -source /usr/local/lib/err +source /usr/local/lib/bash-bear m() { printf "%s\n" "$*"; "$@"; } err-cleanup() { diff --git a/mailclean b/mailclean index 31a431a..e79794a 100755 --- a/mailclean +++ b/mailclean @@ -1,7 +1,7 @@ #!/bin/bash if [ -z "$BASH_VERSION" ]; then echo "error: shell is not bash" >&2; exit 1; fi -source /a/bin/errhandle/err +source /a/bin/bash-bear-trap/bash-bear source /a/bin/bash_unpublished/source-state if [[ $HOSTNAME != "$MAIL_HOST" ]]; then diff --git a/mailtest-check b/mailtest-check index 54db2c2..2287d70 100755 --- a/mailtest-check +++ b/mailtest-check @@ -8,7 +8,7 @@ # wrong -source /b/errhandle/err +source /b/bash-bear-trap/bash-bear [[ $EUID == 0 ]] || exec sudo -E "${BASH_SOURCE[0]}" "$@" diff --git a/mount-latest-remote b/mount-latest-remote index bcd9e28..c80c003 100755 --- a/mount-latest-remote +++ b/mount-latest-remote @@ -16,7 +16,7 @@ # usage: HOST [mount-latest-subvol args] -source /usr/local/lib/err +source /usr/local/lib/bash-bear script_dir=$(dirname $(readlink -f "$BASH_SOURCE")) @@ -49,7 +49,7 @@ if [[ $tg == *:* ]]; then rsynctg="[$tg]" fi # R = relative, t = times, O = omit-dir-times, p = perms -er rsync -RtOp bin/{mount-latest-subvol,check-subvol-stale} lib/err "root@$rsynctg:/usr/local" || continue +er rsync -RtOp bin/{mount-latest-subvol,check-subvol-stale} lib/bash-bear "root@$rsynctg:/usr/local" || continue # note: this can hang if we have an old nfs mount. er ssh root@$tg timeout -s 9 600 /usr/local/bin/mount-latest-subvol "$@" diff --git a/mount-latest-subvol b/mount-latest-subvol index cad9e1c..13cfc3d 100644 --- a/mount-latest-subvol +++ b/mount-latest-subvol @@ -18,7 +18,7 @@ readonly this_file cd / [[ $EUID == 0 ]] || exec sudo -E "$this_file" "$@" -source /usr/local/lib/err +source /usr/local/lib/bash-bear usage() { cat <&2; exit 1; fi -source /a/bin/errhandle/err +source /a/bin/bash-bear-trap/bash-bear shopt -s nullglob shopt -s dotglob diff --git a/nav2beet b/nav2beet index 22322a6..fcd1fb2 100755 --- a/nav2beet +++ b/nav2beet @@ -1,6 +1,6 @@ #!/bin/bash -set -e; . /usr/local/lib/err; set +e +set -e; . /usr/local/lib/bash-bear; set +e source /a/bin/ds/beet-data source /b/bash_unpublished/source-semi-priv diff --git a/nav2beet-local b/nav2beet-local index a25c5c5..4cee677 100755 --- a/nav2beet-local +++ b/nav2beet-local @@ -1,5 +1,5 @@ #!/bin/bash -set -e; . /usr/local/lib/err; set +e +set -e; . /usr/local/lib/bash-bear; set +e source /a/bin/ds/beet-data for r in 1 2 3 4 5; do diff --git a/nextcloud-setup b/nextcloud-setup index f2cddfc..75e1625 100755 --- a/nextcloud-setup +++ b/nextcloud-setup @@ -1,7 +1,7 @@ #!/bin/bash -if [[ -s /usr/local/lib/err ]]; then - source /usr/local/lib/err +if [[ -s /usr/local/lib/bash-bear ]]; then + source /usr/local/lib/bash-bear else exit 1 fi @@ -217,7 +217,7 @@ systemctl enable --now $ncbase.timer i /usr/local/bin/ncup <<'EOFOUTER' #!/bin/bash -source /usr/local/lib/err +source /usr/local/lib/bash-bear m() { printf "%s\n" "$*"; "$@"; } err-cleanup() { diff --git a/primary-setup b/primary-setup index 49961ef..c9c34b7 100755 --- a/primary-setup +++ b/primary-setup @@ -3,7 +3,7 @@ # usage $0 [MAIL_HOST] # setup things which involve being the primary host or not -source /usr/local/lib/err +source /usr/local/lib/bash-bear script_name="${BASH_SOURCE[0]}" script_name="${script_name##*/}" diff --git a/prof b/prof index 35549f5..e4d77d6 100644 --- a/prof +++ b/prof @@ -1,7 +1,7 @@ #!/bin/bash -set -e; . /usr/local/lib/err; set +e +set -e; . /usr/local/lib/bash-bear; set +e dossh=true if (( $# >= 1 )); then diff --git a/prof-backup b/prof-backup index 7aefc21..cf9199b 100755 --- a/prof-backup +++ b/prof-backup @@ -17,7 +17,7 @@ # ssh root@kdwg.b8.nz systemctl --now enable profanity if [ -z "$BASH_VERSION" ]; then echo "error: shell is not bash" >&2; exit 1; fi -source /a/bin/errhandle/err +source /a/bin/bash-bear-trap/bash-bear source /a/bin/bash_unpublished/source-state if [[ $HOSTNAME != "$HOST2" ]]; then diff --git a/prof-notify b/prof-notify index 7c550b1..4421269 100644 --- a/prof-notify +++ b/prof-notify @@ -1,5 +1,5 @@ #!/bin/bash -set -e; . /usr/local/lib/err; set +e +set -e; . /usr/local/lib/bash-bear; set +e while read -r line; do # check that the profanity window is not focused diff --git a/prof-remote b/prof-remote index 787335d..9117f46 100644 --- a/prof-remote +++ b/prof-remote @@ -1,7 +1,7 @@ #!/bin/bash -set -e; . /usr/local/lib/err; set +e +set -e; . /usr/local/lib/bash-bear; set +e remote=$1 fastcon=0 diff --git a/prof-tail b/prof-tail index 9830747..abfa718 100644 --- a/prof-tail +++ b/prof-tail @@ -1,5 +1,5 @@ #!/bin/bash -set -e; . /usr/local/lib/err; set +e +set -e; . /usr/local/lib/bash-bear; set +e xmpp_users=( diff --git a/script-files b/script-files index 89a4277..6ed94b5 100644 --- a/script-files +++ b/script-files @@ -40,6 +40,6 @@ my_service_scripts=( ) # note: turn this into an array if we ever add more -my_lib_files=/a/bin/errhandle/err +my_lib_files=/a/bin/bash-bear-trap/bash-bear all_my_scripts=("${my_service_scripts[@]}" "${my_bin_files[@]}" $my_lib_files) diff --git a/sl/.iank/bash-bear b/sl/.iank/bash-bear new file mode 120000 index 0000000..84622fc --- /dev/null +++ b/sl/.iank/bash-bear @@ -0,0 +1 @@ +/a/bin/bash-bear-trap/bash-bear \ No newline at end of file diff --git a/sl/.iank/err b/sl/.iank/err deleted file mode 120000 index c877367..0000000 --- a/sl/.iank/err +++ /dev/null @@ -1 +0,0 @@ -/a/bin/errhandle/err \ No newline at end of file diff --git a/sound-alert b/sound-alert index ea027f7..4393043 100755 --- a/sound-alert +++ b/sound-alert @@ -1,4 +1,4 @@ #!/bin/bash -set -e; . /usr/local/lib/err; set +e +set -e; . /usr/local/lib/bash-bear; set +e mpv --speed=1 --no-terminal --vo=null --volume=90 /a/bin/data/d20.wav diff --git a/switch-mail-host b/switch-mail-host index 3f299ba..b31ab79 100644 --- a/switch-mail-host +++ b/switch-mail-host @@ -1,6 +1,6 @@ #!/bin/bash -source /usr/local/lib/err +source /usr/local/lib/bash-bear usage() { cat <