bash : archive_check show progress.
This commit is contained in:
parent
47dd82bab0
commit
1d44356116
|
@ -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}"
|
||||
|
|
Reference in a new issue