commit 1327aabe1d65629adc38e66b64f79ce376f336e8
parent d6b7b0fff6487de81ac6fe1590c9c1bffe2cbbfc
Author: Alex Balgavy <alex@balgavy.eu>
Date: Tue, 21 Mar 2023 21:40:11 +0100
mailsync: small readability change
Diffstat:
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/scripts/mailsync b/scripts/mailsync
@@ -1,6 +1,8 @@
#!/bin/sh
# Sync my email using mbsync, reindex via notmuch, print the amount of new messages.
-rbw unlock
+die() { printf '%s\n' "$1" >&2 && exit 1; }
+
+rbw unlock || die 'Vault locked'
mbsync -c /Users/alex/.config/mbsync/mbsyncrc -Va
notmuch-hook
notification_str=""