From 3bd3217ed13653a57b085fd254010921908cbe64 Mon Sep 17 00:00:00 2001 From: Egor Tensin Date: Tue, 18 Apr 2017 05:32:48 +0300 Subject: distr.sh: bugfix --- %HOME%/.bash_utils/distr.sh | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to '%HOME%/.bash_utils') diff --git a/%HOME%/.bash_utils/distr.sh b/%HOME%/.bash_utils/distr.sh index 0e2a196..4b55107 100644 --- a/%HOME%/.bash_utils/distr.sh +++ b/%HOME%/.bash_utils/distr.sh @@ -8,7 +8,7 @@ sums_path='sha1sums.txt' sums_name="$( basename -- "$sums_path" )" -_sums_unescape_path() { +_sums_unescape_path() ( set -o errexit -o nounset -o pipefail if [ "$#" -ne 1 ]; then @@ -20,7 +20,7 @@ _sums_unescape_path() { path="${path//'\\'/$'\\'}" path="${path//'\n'/$'\n'}" echo "$path" -} +) sums_list_paths() ( set -o errexit -o nounset -o pipefail @@ -118,6 +118,8 @@ sums_add_distr() ( sums_add ${paths[@]+"${paths[@]}"} ) -sums_verify() { +sums_verify() ( + set -o errexit -o nounset -o pipefail + sha1sum --check --strict --quiet -- "$sums_path" -} +) -- cgit v1.2.3