summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPatrick Simianer <pks@pks.rocks>2020-08-12 08:22:11 +0200
committerPatrick Simianer <pks@pks.rocks>2020-08-12 08:22:11 +0200
commitcd966e11d0f621e69446ab4628cada43d0bf72ab (patch)
tree3ed96c179967a98620d8568a1749c023d19217b5
parentfe6936591fad8c211c1b00c20df4d830d5f2dc77 (diff)
sync-mail: secondary/primary
-rwxr-xr-xsync-mail13
1 files changed, 10 insertions, 3 deletions
diff --git a/sync-mail b/sync-mail
index 406e49c..705ff33 100755
--- a/sync-mail
+++ b/sync-mail
@@ -7,11 +7,18 @@ if [[ $(uname) == "Linux" ]]; then
export PATH=/home/$(whoami)/.local/bin:$PATH
fi
-$(which imapfilter) -c $HOME/.imapfilter/personal.lua 2>/dev/null
+$(which imapfilter) -c $HOME/.imapfilter/primary.lua 2>/dev/null
-$(which mbsync) -q personal
+case `date +"%a"` in
+ Sat|Sun)
+ $(which mbsync) -q primary
+ ;;
+ *)
+ $(which mbsync) -q -a
+ ;;
+esac
-new="$(find $HOME/.mail/*/inbox/new/ -type f | wc -l)"
+new="$(find $HOME/.mail/primary/inbox/new/ -type f | wc -l)"
if [ $new -gt 0 ]
then