summaryrefslogtreecommitdiffstats
path: root/.mutt
diff options
context:
space:
mode:
authorJan Pokorný <jpokorny@redhat.com>2013-04-12 18:32:50 +0200
committerJan Pokorný <jpokorny@redhat.com>2013-04-12 18:48:22 +0200
commitaf23359633a9a6dc0ccce3c0d93ef2df73c667af (patch)
treefbd82968ed8e74e1cefcd5d4ae8d500d8f7b974e /.mutt
parentfca26908f07d00f6cc2fe9478b15f6f0b31f9cf2 (diff)
downloaddotfiles-af23359633a9a6dc0ccce3c0d93ef2df73c667af.tar.gz
dotfiles-af23359633a9a6dc0ccce3c0d93ef2df73c667af.tar.xz
dotfiles-af23359633a9a6dc0ccce3c0d93ef2df73c667af.zip
mutt: add script to get and prepare another script for notifications
Also make a .gitignore cleanup wrt mutt Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
Diffstat (limited to '.mutt')
-rwxr-xr-x.mutt/maildir_watch_setup.sh16
1 files changed, 16 insertions, 0 deletions
diff --git a/.mutt/maildir_watch_setup.sh b/.mutt/maildir_watch_setup.sh
new file mode 100755
index 0000000..53d9bb4
--- /dev/null
+++ b/.mutt/maildir_watch_setup.sh
@@ -0,0 +1,16 @@
+#!/bin/bash
+
+# see misc/crontab
+# the script suppose ./folders file with one folder per-line,
+# prefixed with '=' and ending with '\'
+
+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 \
+ | sed 's|^=\([A-Za-z0-9.-]\+\)\s.*$|\1|' | paste -s
+ ))|" > maildir_watch.sh
+chmod +x maildir_watch.sh