X-Git-Url: https://iankelling.org/git/?p=distro-setup;a=blobdiff_plain;f=brc2;h=959e892562f485afde4748c71cd66456c23f89ab;hp=75ed2bcc5ead91e501b91d49a13c6bc9a6ae0899;hb=32a1673064cfd9eaa165b4ea62fa416f02f3dfd2;hpb=4d0dc703ef2e62cd16ea84f27456f6f50f74baa3 diff --git a/brc2 b/brc2 index 75ed2bc..959e892 100644 --- a/brc2 +++ b/brc2 @@ -122,8 +122,10 @@ bbk() { # btrbk wrapper fi # run latest install-my-scripts - btrbk-run "$@" | pee cat "systemd-cat -t btrbk-run" - $active && ser enable btrbk.timer + btrbk-run "$@" |& pee cat "systemd-cat -t btrbk-run" + if $active; then + ser enable btrbk.timer + fi } bfg() { java -jar /a/opt/bfg-1.12.14.jar "$@"; } @@ -137,14 +139,14 @@ bpull() { c / # run latest install-my-scripts - switch-mail-host $1 $HOSTNAME | pee cat "systemd-cat -t switch-mail-host" + switch-mail-host pull $1 |& pee cat "systemd-cat -t switch-mail-host" } bpush() { [[ $1 ]] || return 1 c / # run latest install-my-scripts - switch-mail-host $HOSTNAME $1 | pee cat "systemd-cat -t switch-mail-host" + switch-mail-host push $1 |& pee cat "systemd-cat -t switch-mail-host" } lipush() { # note, i had --delete-excluded, but that deletes all files in --exclude-from on @@ -153,13 +155,13 @@ lipush() { p=(/a/bin /a/exe /a/h /a/c /p/c/machine_specific/linode{,.hosts} /a/opt/{emacs,emacs-debianstable,mu}) a="-ahviSAXPH --specials --devices --delete --relative --exclude-from=/p/c/li-rsync-excludes" ret=0 - m rsync $@ $a ${p[@]} /p/c/machine_specific/l2 root@l2.b8.nz:/ || ret=$? - m rsync $@ $a ${p[@]} /p/c/machine_specific/li root@li.b8.nz:/ || ret=$? - m rsync $@ -ahviSAXPH root@iankelling.org:/a/h/proposed-comments/ /a/h/proposed-comments || ret=$? + m rsync "$@" $a ${p[@]} /p/c/machine_specific/l2 root@l2.b8.nz:/ || ret=$? + m rsync "$@" $a ${p[@]} /p/c/machine_specific/li root@li.b8.nz:/ || ret=$? + m rsync "$@" -ahviSAXPH root@iankelling.org:/a/h/proposed-comments/ /a/h/proposed-comments || ret=$? return $ret } lipushnoe() { # noe = noemacs. for running faster. - rsync $@ --delete-excluded -ahviSAXPH --specials --devices --delete --relative \ + rsync "$@" --delete-excluded -ahviSAXPH --specials --devices --delete --relative \ --exclude-from=/p/c/li-rsync-excludes /a/bin /a/exe /a/h /a/c /p/c/machine_specific/li root@li:/ } @@ -272,13 +274,18 @@ digme() { dup() { local ran_d ran_d=false + system-status _ case $PS1 in *DISTRO-BEGIN!*|*DISTRO!*) + pushd / /b/ds/distro-begin || return $? + popd ran_d=true ;;& *DISTRO-END!*|*DISTRO!*) + pushd /b/ds/distro-end || return $? + popd ran_d=true ;;& *CONFLINK*) @@ -512,12 +519,10 @@ fw() { firefox -P default "$@" >/dev/null 2>&1 } - gitian() { git config user.email ian@iankelling.org } - # at least in flidas, things rely on gpg being gpg1 gpg() { command gpg2 "$@" @@ -532,7 +537,6 @@ gse() { --suppress-cc=self "$@" } - hstatus() { # do git status on published repos. c /a/bin/githtml @@ -548,11 +552,16 @@ hstatus() { done } - idea() { /a/opt/idea-IC-163.7743.44/bin/idea.sh "$@" &r } +ilog() { + chan=${1:-#fsfsys} + # use * instead of -r since that does sorted order + ssh root@iankelling.org "cd /var/lib/znc/moddata/log/iank/freenode/$chan && hr && for x in *; do echo \$x; cat \$x; hr; done" | less +G +} + o() { if type gvfs-open &> /dev/null ; then gvfs-open "$@" @@ -570,7 +579,7 @@ jtail() { journalctl -n 10000 -f "$@" | jfilter } jr() { journalctl "$@" | jfilter | less ; } -jrf() { journalctl -f "$@" | jfilter; } +jrf() { journalctl -n 200 -f "$@" | jfilter; } kff() { # keyboardio firmware flash @@ -636,10 +645,14 @@ mdt() { firefox /tmp/mdtest.html } - - mo() { xset dpms force off; } # monitor off +myirc() { + chan=${1:-fsf-office} + # use * instead of -r since that does sorted order + ssh root@iankelling.org "cd /var/lib/znc/moddata/log/iank/freenode/#$chan; grep '\