aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/%HOME%/.bash_utils
diff options
context:
space:
mode:
authorEgor Tensin <Egor.Tensin@gmail.com>2017-04-18 05:32:48 +0300
committerEgor Tensin <Egor.Tensin@gmail.com>2017-04-18 05:32:48 +0300
commit3bd3217ed13653a57b085fd254010921908cbe64 (patch)
treed2633177fc3af7701922be48648ab960744fc445 /%HOME%/.bash_utils
parentcode style (diff)
downloadlinux-home-3bd3217ed13653a57b085fd254010921908cbe64.tar.gz
linux-home-3bd3217ed13653a57b085fd254010921908cbe64.zip
distr.sh: bugfix
Diffstat (limited to '')
-rw-r--r--%HOME%/.bash_utils/distr.sh10
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"
-}
+)