bash : archive_check show progress.

This commit is contained in:
Dmitry Voronin 2023-10-13 09:18:41 +03:00
parent 47dd82bab0
commit 1d44356116

View file

@ -84,10 +84,10 @@ archive_check()
saved="${saved%%.*}"
# calculate actual hash.
actual="$(sha1sum $file | cut -d\ -f1)"
actual="$(pv ${file} | sha1sum | cut -d\ -f1)"
# compare hashes, show error on mismatch.
if [[ "$actual" = "$saved" ]]; then
if [[ "${actual}" = "${saved}" ]]; then
echo "${status}: OK."
else
echo -e "${color_red}${status}: failed.${color_default}"