diff --git a/document/linux/config/bash/module/archive.sh b/document/linux/config/bash/module/archive.sh index 1100b25..a3cc981 100644 --- a/document/linux/config/bash/module/archive.sh +++ b/document/linux/config/bash/module/archive.sh @@ -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}"