From 69bc6ccc2bdafb87acb0367b9036c5db42b184a9 Mon Sep 17 00:00:00 2001 From: "Alex A. Naanou" Date: Thu, 13 Mar 2025 01:09:59 +0300 Subject: [PATCH] now compression reports progress... Signed-off-by: Alex A. Naanou --- Archive/media/img/my/work/compress-archive.sh | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/Archive/media/img/my/work/compress-archive.sh b/Archive/media/img/my/work/compress-archive.sh index 1c64f111..8dacfdfe 100755 --- a/Archive/media/img/my/work/compress-archive.sh +++ b/Archive/media/img/my/work/compress-archive.sh @@ -91,9 +91,20 @@ fi # do the work... -find "$BASE_PATH" -name \*.${EXT} -exec ${ARCH} \; \ - && echo done. +#find "$BASE_PATH" -name \*.${EXT} -exec ${ARCH} \; \ +# && echo done. +IFS=$'\n' +ARWs=($(find "$BASE_PATH" -name \*.${EXT})) +COUNT=${#ARWs[@]} +DONE=1 +for f in "${ARWs[@]}" ; do + echo $f + printf 'Doing: %d/%d\r' $DONE $COUNT + eval "${ARCH/\{\}/\"$f\"}" > /dev/null + DONE=$((DONE + 1)) +done +echo done. # vim:set nowrap nospell :