X-Git-Url: https://iankelling.org/git/?a=blobdiff_plain;f=switch-mail-host;h=651c96ecc3a92d00e37cd50fc189d8a735e75db6;hb=cd8ada3f2923a3937e212d79748623b003cad62e;hp=4a7ce3744a9cd3e20f81aa087fedf4bef26e927a;hpb=d6def754cd241538c61456536b52ee51cbd85b42;p=distro-setup diff --git a/switch-mail-host b/switch-mail-host index 4a7ce37..651c96e 100644 --- a/switch-mail-host +++ b/switch-mail-host @@ -41,7 +41,7 @@ err-cleanup() { fi } -pre="$script_name:" +pre="${SSH_CLIENT:+$HOSTNAME} $script_name:" m() { printf "$pre %s\n" "$*"; "$@"; } e() { printf "$pre %s\n" "$*"; } err() { echo "$pre ERROR: $*" >&2; } @@ -204,11 +204,11 @@ if pgrep -G iank -u iank -f 'emacs --daemon' &>/dev/null; then fi EOF if ! $host2_only; then - cat <<'EOF' + cat </dev/null ||:)█$(tput sgr0 2>/dev/null||:)%.0s" $(eval echo "{1..${COLUMNS:-60}}") +echo + # once I accidentally accepted incoming mail on old host. I used this script to copy over that mail: # # die=false; for d in o.leaf.2021-05-29T10:02:08-0400/m/{4e,md,4e2}/{,l/}!(*myarchive)/new; do if $die; then break; fi; find $d -type f -mtime -5 | while read -r f; do dir="${f%new/*}"; dir="btrbk/o.20210530T000011-0400/${dir#*/}"; fname="${f##*/}"; [[ -e $dir/new/$fname || -e $dir/cur/$fname ]] && continue; if ! e cp -a $f /${dir#*/*/}new; then echo failed cp; die=true; break; fi ; done; done