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 ++++++++---------- local/bin/project-test | 2 +- local/bin/vim-project-gen | 4 ---- local/bin/wake-desktop | 2 +- 4 files changed, 10 insertions(+), 16 deletions(-) delete mode 100755 local/bin/vim-project-gen (limited to 'local') 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" diff --git a/local/bin/project-test b/local/bin/project-test index a0591d8..e8c6261 100755 --- a/local/bin/project-test +++ b/local/bin/project-test @@ -39,5 +39,5 @@ done while read -r rev; do git checkout "$rev" git submodule update - eval $@ + eval "$@" done < <(git rev-list "$REF"..HEAD) diff --git a/local/bin/vim-project-gen b/local/bin/vim-project-gen deleted file mode 100755 index 6a50ba5..0000000 --- a/local/bin/vim-project-gen +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/bash -# Generates ctags and cscope files for project. -ctags -R -f .tags -#cscope -Rbq -f .cscope.out diff --git a/local/bin/wake-desktop b/local/bin/wake-desktop index 24a3cea..b691ddd 100755 --- a/local/bin/wake-desktop +++ b/local/bin/wake-desktop @@ -1,2 +1,2 @@ #!/bin/sh -ssh turris.prg etherwake -i br-lan 70:85:c2:4a:59:f2 +exec ssh turris.prg etherwake -i br-lan 70:85:c2:4a:59:f2 -- cgit v1.2.3