From 01707c746f1b0ade415d033fdef679c227e01b7a Mon Sep 17 00:00:00 2001 From: Egor Tensin Date: Mon, 22 May 2023 07:35:53 +0000 Subject: ignore unsupported inherit_errexit I have a really ancient machine with an even more ancient version of bash that doesn't support inherit_errexit. Ignore for now, put it back later. --- %HOME%/.bash_utils/distr.sh | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) (limited to '%HOME%/.bash_utils/distr.sh') diff --git a/%HOME%/.bash_utils/distr.sh b/%HOME%/.bash_utils/distr.sh index 7a1996b..1a42afd 100644 --- a/%HOME%/.bash_utils/distr.sh +++ b/%HOME%/.bash_utils/distr.sh @@ -10,7 +10,7 @@ sums_name="$( basename -- "$sums_path" )" _sums_unescape_path() ( set -o errexit -o nounset -o pipefail - shopt -s inherit_errexit + shopt -s inherit_errexit 2> /dev/null || true if [ "$#" -ne 1 ]; then echo "usage: ${FUNCNAME[0]} PATH" >&2 @@ -25,7 +25,7 @@ _sums_unescape_path() ( sums_list_paths() ( set -o errexit -o nounset -o pipefail - shopt -s inherit_errexit + shopt -s inherit_errexit 2> /dev/null || true local print_lines= local print_sums= @@ -97,7 +97,8 @@ sums_list_paths() ( sums_add() ( set -o errexit -o nounset -o pipefail - shopt -s inherit_errexit lastpipe + shopt -s inherit_errexit 2> /dev/null || true + shopt -s lastpipe local -A existing local -a missing=() @@ -118,7 +119,8 @@ sums_add() ( sums_add_all() ( set -o errexit -o nounset -o pipefail - shopt -s inherit_errexit lastpipe + shopt -s inherit_errexit 2> /dev/null || true + shopt -s lastpipe local -a paths @@ -132,7 +134,8 @@ sums_add_all() ( sums_add_distr() ( set -o errexit -o nounset -o pipefail - shopt -s inherit_errexit lastpipe + shopt -s inherit_errexit 2> /dev/null || true + shopt -s lastpipe local -a paths local path @@ -156,14 +159,15 @@ sums_add_distr() ( sums_verify() ( set -o errexit -o nounset -o pipefail - shopt -s inherit_errexit + shopt -s inherit_errexit 2> /dev/null || true sha1sum --check --strict --quiet -- "$sums_path" ) sums_remove_missing() ( set -o errexit -o nounset -o pipefail - shopt -s inherit_errexit lastpipe + shopt -s inherit_errexit 2> /dev/null || true + shopt -s lastpipe local dry_run= -- cgit v1.2.3