X-Git-Url: https://iankelling.org/git/?a=blobdiff_plain;f=brc2;h=ddfe816e236aff742d1b75e95f6c8c10d400f0ad;hb=b18dade73dedfe69aa741f8417947d83c4208f2d;hp=9fa1010920e6767057a1699531c519423e973d4b;hpb=e958999a4ab6fddd723270b596b4899c0811fa41;p=distro-setup diff --git a/brc2 b/brc2 index 9fa1010..ddfe816 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 } @@ -1473,7 +1475,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 @@ -1481,6 +1482,62 @@ runsieve() { sed -r '/^info: filtering:/{h;d};/^info: msgid=$/N;/^info: msgid=.*left message in mailbox [^ ]+$/d;/^info: msgid=/{H;g};/^info: message kept in source mailbox.$/d' /tmp/testsieve.log } +# usage: +# alertme SUBJECT +# printf "subject\nbody\n" | alertme +alertme() { + if [[ -t 0 ]]; then + exim -t <