aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/.bashrc_distr
diff options
context:
space:
mode:
authorEgor Tensin <Egor.Tensin@gmail.com>2016-08-14 11:42:56 +0200
committerEgor Tensin <Egor.Tensin@gmail.com>2016-08-14 11:42:56 +0200
commit3b713427c07f042852c826efb0010e4bb3404b0c (patch)
tree664918bc4a11cab4f5ac9894e7b16a083f03e2a2 /.bashrc_distr
parentexport PYTHONSTARTUP (diff)
downloadlinux-home-3b713427c07f042852c826efb0010e4bb3404b0c.tar.gz
linux-home-3b713427c07f042852c826efb0010e4bb3404b0c.zip
set -o errexit -o nounset -o pipefail in functions
Diffstat (limited to '.bashrc_distr')
-rw-r--r--.bashrc_distr8
1 files changed, 6 insertions, 2 deletions
diff --git a/.bashrc_distr b/.bashrc_distr
index a680b6b..f573653 100644
--- a/.bashrc_distr
+++ b/.bashrc_distr
@@ -12,14 +12,18 @@ update_checksums() {
sha1sum -- "$@" > "$checksums_path"
}
-update_checksums_distr() {
+update_checksums_distr() (
+ set -o errexit -o nounset -o pipefail
+
local -a paths
local path
+
while IFS= read -d '' -r path; do
paths+=("$path")
done < <( find . -type f -\( -iname '*.exe' -o -iname '*.iso' -\) -print0 )
+
update_checksums "${paths[@]+"${paths[@]}"}"
-}
+)
verify_checksums() {
sha1sum --check "$checksums_path"