From 8945a62fdffc085386d22bcbe8d6a20643d7e5e5 Mon Sep 17 00:00:00 2001 From: Mark Wooding Date: Sat, 25 Apr 2020 21:54:05 +0100 Subject: [PATCH] bin/fixsub: Add little script for hacking Dovecot subscription files. --- Makefile | 1 + bin/fixsub | 13 +++++++++++++ 2 files changed, 14 insertions(+) create mode 100755 bin/fixsub diff --git a/Makefile b/Makefile index 9256ee7..e192950 100644 --- a/Makefile +++ b/Makefile @@ -224,6 +224,7 @@ SCRIPTLINKS += svnwrap SCRIPTLINKS += guest-console SCRIPTLINKS += hyperspec SCRIPTLINKS += datasyms +SCRIPTLINKS += fixsub SCRIPTLINKS += check-debsyms SCRIPTLINKS += check-blkdev-size diff --git a/bin/fixsub b/bin/fixsub new file mode 100755 index 0000000..ab76cb1 --- /dev/null +++ b/bin/fixsub @@ -0,0 +1,13 @@ +#! /bin/sh -e +cd $HOME/mail +find . \ + \( -name ".?*" -o \ + -name bin -o \ + -name "*~" -o \ + -name "*.nov" -o \ + -name "to.split" \) -prune -o \ + -type f -print \ + >.subscriptions.tmp +{ echo INBOX; sort .subscriptions.tmp | sed 's:^./::'; } >.subscriptions.new +mv .subscriptions.new .subscriptions +rm -f .subscriptions.tmp -- 2.11.0