From 0984845eab710b2a279b64738552e1dd0619706d Mon Sep 17 00:00:00 2001 From: Simon Bruder Date: Tue, 25 Feb 2020 23:30:26 +0000 Subject: [PATCH] cbz2ebook: work with nested directories --- cbz2ebook.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/cbz2ebook.sh b/cbz2ebook.sh index 931b1d7..da87116 100755 --- a/cbz2ebook.sh +++ b/cbz2ebook.sh @@ -18,10 +18,10 @@ trap cleanup EXIT INT SIGTERM cd "$tmpdir" unzip "$infile" -renumber 4 **/* -length=$(ls -1 **/* | wc -l) +renumber 4 **/*.??? +length=$(ls -1 **/*.??? | wc -l) position=0 -for image in **/*; do +for image in **/*.???; do width=$(identify -format "%W" "$image") height=$(identify -format "%H" "$image") if (($width > $height)); then @@ -33,5 +33,5 @@ for image in **/*; do echo -ne "$(printf '%3s' $((100 * $position / $length))) % "$(printf "%0*d" "$((72 * $position / $length))" 0 | tr '0' '#')'\r' done echo -zip "$outfile" **/* +zip "$outfile" **/*.??? cd -