#!/usr/bin/env rc NOTMUCH_CONFIG=$HOME/.config/notmuch/config echo $NOTMUCH_CONFIG >>/tmp/mail.log if(ping -c1 8.8.8.8 >>/tmp/mail.log >[2=1]) { mbsync mailbox c4 >>/tmp/mail.log >[2=1] && notmuch new >>/tmp/mail.log >[2=1] } date >>/tmp/mail.log