v0.5 Fixed bug: If previous session crashed temp files were still existing and would be incorporated into the next conversion.

This commit is contained in:
Ze'ev Schurmann 2023-09-19 17:59:31 +02:00
parent eed9497268
commit c8690afa3b
1 changed files with 3 additions and 1 deletions

View File

@ -2,7 +2,7 @@
function Help {
echo "cbr2cbz Conversion Tool"
echo "Version 0.4"
echo "Version 0.5"
echo "https://git.zaks.web.za/thisiszeev/cbr2cbz"
echo
echo 'Usage: cbr2cbz single "filename.cbr"'
@ -49,6 +49,7 @@ function Convert {
}
function BatchRun {
rm -R "/tmp/cbr2cbz"
mkdir -p "/tmp/cbr2cbz"
find . -type f -name "*.cbr" > /tmp/cbr2cbz.list
files=$( cat /tmp/cbr2cbz.list | wc -l )
@ -79,6 +80,7 @@ then
echo "If filename has spaces or special characters please pass it within quotes."
Help
fi
rm -R "/tmp/cbr2cbz"
cbr=$2
size=$(( ${#cbr} - 1 ))
cbz="${cbr:0:$size}z"