diff options
author | Patrick Simianer <pks@pks.rocks> | 2020-08-12 08:22:11 +0200 |
---|---|---|
committer | Patrick Simianer <pks@pks.rocks> | 2020-08-12 08:22:11 +0200 |
commit | cd966e11d0f621e69446ab4628cada43d0bf72ab (patch) | |
tree | 3ed96c179967a98620d8568a1749c023d19217b5 | |
parent | fe6936591fad8c211c1b00c20df4d830d5f2dc77 (diff) |
sync-mail: secondary/primary
-rwxr-xr-x | sync-mail | 13 |
1 files changed, 10 insertions, 3 deletions
@@ -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 |