From 4c76bb0ffa087a4612344677b85635ffe7382c77 Mon Sep 17 00:00:00 2001 From: "Alex A. Naanou" Date: Mon, 26 Feb 2024 17:25:41 +0300 Subject: [PATCH] better archiver handling... Signed-off-by: Alex A. Naanou --- Viewer/archive/media/img/my/work/compress-archive.sh | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/Viewer/archive/media/img/my/work/compress-archive.sh b/Viewer/archive/media/img/my/work/compress-archive.sh index 98e8c7f2..65719536 100755 --- a/Viewer/archive/media/img/my/work/compress-archive.sh +++ b/Viewer/archive/media/img/my/work/compress-archive.sh @@ -78,14 +78,16 @@ if [ "$1" ] ; then BASE_PATH=$1 fi +# check if archiver exists... +if ! which ${ARCH/ *} > /dev/null 2>&1 ; then + echo "$0: ${ARCH/ *}: command not found." >&2 + exit 1 +fi # do the work... -find "$BASE_PATH" -name \*.${EXT} -exec ${ARCH} \; - - - -echo done. +find "$BASE_PATH" -name \*.${EXT} -exec ${ARCH} \; \ + && echo done.