diff options
-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 |