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 --- install | 2 +- local/bin/allsync | 18 ++++++++---------- local/bin/project-test | 2 +- local/bin/vim-project-gen | 4 ---- local/bin/wake-desktop | 2 +- 5 files changed, 11 insertions(+), 17 deletions(-) delete mode 100755 local/bin/vim-project-gen diff --git a/install b/install index 16a07a1..74f9acd 100755 --- a/install +++ b/install @@ -23,6 +23,7 @@ if ask "git" "Install GIT configuration"; then inst gitconfig ~/.gitconfig inst gitignore ~/.gitignore git config --global core.excludesfile ~/.gitignore + inst local/bin/cznic-git-config ~/.local/bin/cznic-git-config fi if ask "gpg" "Install GPG configuration"; then @@ -40,7 +41,6 @@ fi if ask "vim" "Install VIM scripts"; then inst vimrc ~/.vimrc inst vim/ ~/.vim - inst local/bin/vim-project-gen ~/.local/bin/vim-project-gen mkdir -p ~/.cache/vim # directory for *.swp files mkdir -p ~/.cache/vim-undo # directory for undo files # Vim plugin manager 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