blob: 51d6bef2e8dda5850e29413e56eb93d0db4bf0b1 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
|
#!/bin/sh
set -eu
sec() {
echo -e '\e[1;34m==========' "$@" '==========\e[0m'
}
ecode=0
fail() {
echo -e '\e[1;31m---' "$@" '---' "($?)" '\e[0m'
ecode=1
}
sec "Mail"
mbsync -a || fail "Mail synchronization reported failure"
notmuch new
~/.local/sbin/newmail-notify
notmuch tag --batch --input="$HOME/.notmuch-tag-new"
sec "Calendar and contacts"
vdirsyncer sync || fail "Calendar and contacts synchronization reported failure"
sec "Passwords"
pass git pull || fail "Passwords pull failed"
pass git push || fail "Passwords push failed"
exit $ecode
|