diff options
author | tv <tv@shackspace.de> | 2014-08-21 17:28:34 +0200 |
---|---|---|
committer | tv <tv@shackspace.de> | 2014-08-21 17:28:34 +0200 |
commit | 0e9851a7ac4ef58686c7704dcb13ddfa54cc76b2 (patch) | |
tree | f44849dabe94e2eb504a0f2745d9d9172d265ad9 /wu-user/bin/rm-killed-mail | |
parent | ad6919804b89647c9db3f37c503103950be32071 (diff) |
wu-user: add bin/rm-killed-mail
Diffstat (limited to 'wu-user/bin/rm-killed-mail')
-rwxr-xr-x | wu-user/bin/rm-killed-mail | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/wu-user/bin/rm-killed-mail b/wu-user/bin/rm-killed-mail new file mode 100755 index 0000000..b8c7ae8 --- /dev/null +++ b/wu-user/bin/rm-killed-mail @@ -0,0 +1,21 @@ +#! /bin/sh +set -euf + +if ! notmuch search tag:killed | grep -q . ; then + echo 'no killed mail; abort.' + exit 1 +fi + +notmuch search tag:killed +printf 'want do rm these mail? [y/N] ' +read REPLY +case "$REPLY" in + y|Y) :;; # continue + *) + echo 'abort.' + exit 2 + ;; +esac + +notmuch search --output=files tag:killed | xargs -l rm -v +notmuch new |