X-Git-Url: https://iankelling.org/git/?a=blobdiff_plain;f=brc2;h=6b977839c870f2a4d37c0ae8bc3a3cc31aebe250;hb=d7551546ac323c5d4b49370c885646bcf96e959f;hp=5cd83b2223641705ff2762871aee5b22385f33c4;hpb=2b981100a8b45f117d6f5c165404937f3c917e8f;p=distro-setup diff --git a/brc2 b/brc2 index 5cd83b2..6b97783 100644 --- a/brc2 +++ b/brc2 @@ -169,8 +169,10 @@ EOF fi sudo chroot $d apt-get update sudo DEBIAN_FRONTEND=noninteractive chroot $d apt-get -y dist-upgrade --purge --auto-remove - sudo DEBIAN_FRONTEND=noninteractive schroot -c $n -- apt-get install --allow-unauthenticated -y ${apps[@]} sudo cp -P {,$d}/etc/localtime + if (( ${#apps[@]} )); then + sudo DEBIAN_FRONTEND=noninteractive schroot -c $n -- apt-get install --allow-unauthenticated -y ${apps[@]} + fi } @@ -379,6 +381,22 @@ bigclock() { nnn() { /a/opt/nnn -H "$@"; } +locat() { # log-once cat + local files + ngset + files=(/var/local/cron-errors/* /home/iank/cron-errors/* /sysd-mail-once-state/*) + case ${#files[@]} in + 0) : ;; + 1) + echo ${files[0]} + head ${files[0]} + ;; + *) + head ${files[@]} + ;; + esac + ngreset +} # duplicated somewhat below. jrun() { # journal run. run args, log to journal, tail and grep the journal. @@ -1473,7 +1491,6 @@ testmail() { # always run this first, edit the test files, then run the following testsieve() { sieve-filter ~/sieve/maintest.sieve ${1:-INBOX} delete 2> >(head; tail) >/tmp/testsieve.log && sed -rn '/^Performed actions:/,/^[^ ]/{/^ /p}' /tmp/testsieve.log | sort | uniq -c - _dosieve } runsieve() { c ~/sieve; cp personal{test,}.sieve; cp lists{test,}.sieve; cp personalend{test,}.sieve @@ -1487,14 +1504,14 @@ runsieve() { alertme() { if [[ -t 0 ]]; then exim -t <