From ce284a3dae12e78aa69c88ab4fef3dfd19b0fb0d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karel=20Ko=C4=8D=C3=AD?= Date: Thu, 8 Oct 2020 07:55:40 +0200 Subject: Refresh local scripts --- local/bin/allsync | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) (limited to 'local/bin/allsync') 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" -- cgit v1.2.3