summaryrefslogtreecommitdiff
path: root/sync-mail
diff options
context:
space:
mode:
Diffstat (limited to 'sync-mail')
-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