summaryrefslogtreecommitdiffstats
path: root/.mutt
diff options
context:
space:
mode:
authorJan Pokorný <jpokorny@redhat.com>2013-05-17 14:43:48 +0200
committerJan Pokorný <jpokorny@redhat.com>2013-05-17 14:43:48 +0200
commit3c0a801804d138c51f215cf49b98ed6fa5a2dacd (patch)
tree01c79dadff1c5f694917dff9defba0737fcd6353 /.mutt
parent186782492cacbbfd0829bfa450902b4b6455733a (diff)
downloaddotfiles-3c0a801804d138c51f215cf49b98ed6fa5a2dacd.tar.gz
dotfiles-3c0a801804d138c51f215cf49b98ed6fa5a2dacd.tar.xz
dotfiles-3c0a801804d138c51f215cf49b98ed6fa5a2dacd.zip
Mutt config: maildir_watch_setup: add support for blacklist
Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
Diffstat (limited to '.mutt')
-rwxr-xr-x.mutt/maildir_watch_setup.sh4
1 files changed, 3 insertions, 1 deletions
diff --git a/.mutt/maildir_watch_setup.sh b/.mutt/maildir_watch_setup.sh
index 53d9bb4..03a0b63 100755
--- a/.mutt/maildir_watch_setup.sh
+++ b/.mutt/maildir_watch_setup.sh
@@ -4,13 +4,15 @@
# the script suppose ./folders file with one folder per-line,
# prefixed with '=' and ending with '\'
+: ${BLACKLIST:="__DUMMY__"}
+
wget https://raw.github.com/erikw/dotfiles/personal/bin/maildir_watch.sh -O- \
| sed \
-e "s|\(maildir_path=\"\)[^\"]*\"|\1$(
grep -E 'set folder\s+=' ../.muttrc | tr -d ' ' | cut -d= -f2 | sed 's|\~|$HOME|'
)\"|" \
-e "s|\(mailboxes=(\)[^)]*)|\1$(
- grep -E '=[A-Za-z0-9.-]+\s.*\\' folders \
+ grep -E '=[A-Za-z0-9.-]+\s.*\\' folders | grep -Ev "${BLACKLIST}" \
| sed 's|^=\([A-Za-z0-9.-]\+\)\s.*$|\1|' | paste -s
))|" > maildir_watch.sh
chmod +x maildir_watch.sh