diff options
author | Egor Tensin <Egor.Tensin@gmail.com> | 2016-11-26 16:42:10 +0300 |
---|---|---|
committer | Egor Tensin <Egor.Tensin@gmail.com> | 2016-11-26 16:42:10 +0300 |
commit | adfe073a4e41b3a83a64372f28932cdc31b05d80 (patch) | |
tree | cc724461e2dd4057d15661c3a33ccd7251ee6a57 /%HOME% | |
parent | .gemrc: --no-document (diff) | |
download | linux-home-adfe073a4e41b3a83a64372f28932cdc31b05d80.tar.gz linux-home-adfe073a4e41b3a83a64372f28932cdc31b05d80.zip |
add sums_update_all
Diffstat (limited to '')
-rw-r--r-- | %HOME%/.bash_utils/distr.sh | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/%HOME%/.bash_utils/distr.sh b/%HOME%/.bash_utils/distr.sh index fc77d9e..f51ca67 100644 --- a/%HOME%/.bash_utils/distr.sh +++ b/%HOME%/.bash_utils/distr.sh @@ -65,6 +65,19 @@ sums_update() ( sha1sum -- ${missing[@]+"${missing[@]}"} >> "$sums_path" ) +sums_update_all() ( + 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 -printf '%P\0' ) + + sums_update ${paths[@]+"${paths[@]}"} +) + sums_update_distr() ( set -o errexit -o nounset -o pipefail |