From dc5b3743faecd72f9d010e291a931c47e2dde092 Mon Sep 17 00:00:00 2001 From: Matt Molyneaux Date: Tue, 19 May 2020 18:52:20 +0100 Subject: [PATCH] Minor code changes to help catch errors earlier --- backup.sh | 5 ++++- shutup.sh | 7 ++++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/backup.sh b/backup.sh index a2793c3..f5f63f8 100755 --- a/backup.sh +++ b/backup.sh @@ -23,8 +23,11 @@ # # 2019-07-31 # * Initial version +# +# 2020-05-19 +# * Minor changes to catch errors earlier -set -e +set -euo pipefail rc_path="~/.config/moggers87/backuprc" diff --git a/shutup.sh b/shutup.sh index df906f6..6ae2228 100755 --- a/shutup.sh +++ b/shutup.sh @@ -29,6 +29,11 @@ # # 2016-07-13 # * Check for shutuprc in user home +# +# 2020-05-19 +# * Minor changes to catch errors earlier + +set -euo pipefail git fetch --all --prune || exit 1 @@ -40,7 +45,7 @@ if [ -e `git rev-parse --show-toplevel`/.shutuprc ]; then fi ## these options can be set in `.shutuprc` -if [[ -z $ignore_branches_regex ]]; then +if [[ -z ${ignore_branches_regex:-} ]]; then ignore_branches_regex="master" fi -- 2.11.4.GIT