aboutsummaryrefslogtreecommitdiff
path: root/local/bin
diff options
context:
space:
mode:
authorKarel Kočí <karel.koci@nic.cz>2020-10-08 07:55:40 +0200
committerKarel Kočí <karel.koci@nic.cz>2020-10-08 07:55:40 +0200
commitce284a3dae12e78aa69c88ab4fef3dfd19b0fb0d (patch)
tree127260500d075ed6189c38564fca947c255bd4cd /local/bin
parent6c87803ec2c5338f9246c8689f3aded284417604 (diff)
downloadmyconfigs-ce284a3dae12e78aa69c88ab4fef3dfd19b0fb0d.tar.gz
myconfigs-ce284a3dae12e78aa69c88ab4fef3dfd19b0fb0d.tar.bz2
myconfigs-ce284a3dae12e78aa69c88ab4fef3dfd19b0fb0d.zip
Refresh local scripts
Diffstat (limited to 'local/bin')
-rwxr-xr-xlocal/bin/allsync18
-rwxr-xr-xlocal/bin/project-test2
-rwxr-xr-xlocal/bin/vim-project-gen4
-rwxr-xr-xlocal/bin/wake-desktop2
4 files changed, 10 insertions, 16 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"
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