From 1d443561167e0072a118034c4559a8d022750e42 Mon Sep 17 00:00:00 2001 From: desktop Date: Fri, 13 Oct 2023 09:18:41 +0300 Subject: [PATCH] bash : archive_check show progress. --- document/linux/config/bash/module/archive.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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}"