cbz2ebook: work with nested directories
This commit is contained in:
parent
687e9e0812
commit
0984845eab
|
@ -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 -
|
||||
|
|
Loading…
Reference in a new issue