From adaf73b538b9704d7a4c45d132bc8e20127f498a Mon Sep 17 00:00:00 2001 From: Egor Tensin Date: Thu, 2 Feb 2023 17:56:50 +0100 Subject: accomodate older bash-es --- links-chmod | 3 ++- links-remove | 3 ++- links-update | 3 ++- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/links-chmod b/links-chmod index f722b95..c0cf71e 100755 --- a/links-chmod +++ b/links-chmod @@ -8,7 +8,8 @@ # usage: ./links-chmod [-h|--help] [-d|--database PATH] [-s|--shared-dir DIR] [-n|--dry-run] MODE set -o errexit -o nounset -o pipefail -shopt -s inherit_errexit lastpipe +shopt -s inherit_errexit 2> /dev/null || true +shopt -s lastpipe script_name="$( basename -- "${BASH_SOURCE[0]}" )" readonly script_name diff --git a/links-remove b/links-remove index c378485..2efc46d 100755 --- a/links-remove +++ b/links-remove @@ -8,7 +8,8 @@ # usage: ./links-remove [-h|--help] [-d|--database PATH] [-s|--shared-dir DIR] [-n|--dry-run] set -o errexit -o nounset -o pipefail -shopt -s inherit_errexit lastpipe +shopt -s inherit_errexit 2> /dev/null || true +shopt -s lastpipe script_name="$( basename -- "${BASH_SOURCE[0]}" )" readonly script_name diff --git a/links-update b/links-update index 5b15f1b..322cd49 100755 --- a/links-update +++ b/links-update @@ -20,7 +20,8 @@ # usage: ./links-update [-h|--help] [-d|--database PATH] [-s|--shared-dir DIR] [-m|--mode MODE] [-n|--dry-run] set -o errexit -o nounset -o pipefail -shopt -s inherit_errexit lastpipe +shopt -s inherit_errexit 2> /dev/null || true +shopt -s lastpipe script_name="$( basename -- "${BASH_SOURCE[0]}" )" readonly script_name -- cgit v1.2.3