diff options
author | Karel Kočí <karel.koci@nic.cz> | 2020-10-08 07:55:40 +0200 |
---|---|---|
committer | Karel Kočí <karel.koci@nic.cz> | 2020-10-08 07:55:40 +0200 |
commit | ce284a3dae12e78aa69c88ab4fef3dfd19b0fb0d (patch) | |
tree | 127260500d075ed6189c38564fca947c255bd4cd /local/bin/allsync | |
parent | 6c87803ec2c5338f9246c8689f3aded284417604 (diff) | |
download | myconfigs-ce284a3dae12e78aa69c88ab4fef3dfd19b0fb0d.tar.gz myconfigs-ce284a3dae12e78aa69c88ab4fef3dfd19b0fb0d.tar.bz2 myconfigs-ce284a3dae12e78aa69c88ab4fef3dfd19b0fb0d.zip |
Refresh local scripts
Diffstat (limited to 'local/bin/allsync')
-rwxr-xr-x | local/bin/allsync | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/local/bin/allsync b/local/bin/allsync index b475460..3943ab4 100755 --- a/local/bin/allsync +++ b/local/bin/allsync @@ -1,20 +1,18 @@ #!/bin/sh +set -eu sec() { echo -e '\e[1;34m==========' "$@" '==========\e[0m' } - -run() { - sec "Mail" - mbsync -a - ~/.local/sbin/newmail-notify - - sec "Calendar and contacts" - vdirsyncer sync +fail() { + echo -e '\e[1;31m---' "$@" '---' "($?)" '\e[0m' } +sec "Mail" +mbsync -a +~/.local/sbin/newmail-notify || fail "Mail synchronization reported failure" - -run +sec "Calendar and contacts" +vdirsyncer sync || "Calendar and contacts synchronization reported failure" |