From cd966e11d0f621e69446ab4628cada43d0bf72ab Mon Sep 17 00:00:00 2001 From: Patrick Simianer Date: Wed, 12 Aug 2020 08:22:11 +0200 Subject: sync-mail: secondary/primary --- sync-mail | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) (limited to 'sync-mail') 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 -- cgit v1.2.3