diff options
author | Egor Tensin <Egor.Tensin@gmail.com> | 2017-04-18 05:32:48 +0300 |
---|---|---|
committer | Egor Tensin <Egor.Tensin@gmail.com> | 2017-04-18 05:32:48 +0300 |
commit | 3bd3217ed13653a57b085fd254010921908cbe64 (patch) | |
tree | d2633177fc3af7701922be48648ab960744fc445 /%HOME% | |
parent | code style (diff) | |
download | linux-home-3bd3217ed13653a57b085fd254010921908cbe64.tar.gz linux-home-3bd3217ed13653a57b085fd254010921908cbe64.zip |
distr.sh: bugfix
Diffstat (limited to '')
-rw-r--r-- | %HOME%/.bash_utils/distr.sh | 10 |
1 files changed, 6 insertions, 4 deletions
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" -} +) |