diff options
Diffstat (limited to 'bin/hibiki/mailsync')
| -rwxr-xr-x | bin/hibiki/mailsync | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/bin/hibiki/mailsync b/bin/hibiki/mailsync index bea6e83..2009474 100755 --- a/bin/hibiki/mailsync +++ b/bin/hibiki/mailsync @@ -3,6 +3,14 @@ set -e [ -n "$DEBUG" ] && set -x +# check requirements +for tool in mbsync notify-send python awk gdbus iconez; do + if ! command -v "$tool" >/dev/null; then + printf '%s: %s not installed but required\n' "$(basename "$0")" "$tool" >&2 + exit 1 + fi +done + maildir="${HOME}/mail" cachefile=${XDG_CACHE_HOME}/mailsync.lastrun @@ -132,7 +140,7 @@ run_sync() { "$id" >/dev/null # index new messages - command notmuch >/dev/null && notmuch new + command notmuch >/dev/null 2>&1 && notmuch new } # only list new mail, don't sync |