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"
|
cd "$tmpdir"
|
||||||
unzip "$infile"
|
unzip "$infile"
|
||||||
renumber 4 **/*
|
renumber 4 **/*.???
|
||||||
length=$(ls -1 **/* | wc -l)
|
length=$(ls -1 **/*.??? | wc -l)
|
||||||
position=0
|
position=0
|
||||||
for image in **/*; do
|
for image in **/*.???; do
|
||||||
width=$(identify -format "%W" "$image")
|
width=$(identify -format "%W" "$image")
|
||||||
height=$(identify -format "%H" "$image")
|
height=$(identify -format "%H" "$image")
|
||||||
if (($width > $height)); then
|
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'
|
echo -ne "$(printf '%3s' $((100 * $position / $length))) % "$(printf "%0*d" "$((72 * $position / $length))" 0 | tr '0' '#')'\r'
|
||||||
done
|
done
|
||||||
echo
|
echo
|
||||||
zip "$outfile" **/*
|
zip "$outfile" **/*.???
|
||||||
cd -
|
cd -
|
||||||
|
|
Loading…
Reference in a new issue