From adfe073a4e41b3a83a64372f28932cdc31b05d80 Mon Sep 17 00:00:00 2001 From: Egor Tensin Date: Sat, 26 Nov 2016 16:42:10 +0300 Subject: add sums_update_all --- %HOME%/.bash_utils/distr.sh | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to '%HOME%/.bash_utils') 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 -- cgit v1.2.3