]> gitweb.hhaalo.de Git - scantopdf.git/commitdiff
fix scanned pdf with process id
authorBastian Dehn <hhaalo@arcor.de>
Sat, 18 Oct 2025 18:35:17 +0000 (20:35 +0200)
committerBastian Dehn <hhaalo@arcor.de>
Sat, 18 Oct 2025 18:35:17 +0000 (20:35 +0200)
src/scanbasic.sh

index b0dd06e3d85cc0bea25541950bf3d6565c19bd9f..12380fc0633640c54911153f44d80ac26e81fb09 100644 (file)
@@ -93,11 +93,11 @@ createonepdf()
                        || return $?
        done
 
-       pdftk scanned*.pdf output $output \
+       pdftk scanned-$$-*.pdf output $output \
                || errlog "could not convert into single $output" \
                || return $?
 
-       rm scanned*.pdf \
+       rm scanned-$$-*.pdf \
                || errlog "could not remove scanned pdfs" \
                || return $?
 
@@ -124,7 +124,7 @@ createpdf()
        local i=
        for i in $(seq $start $end); do
                countno=$(printf "%03d" $i)
-               pdfs=$(echo $pdfs "scanned$countno.pdf")
+               pdfs=$(echo $pdfs "scanned-$$-$countno.pdf")
        done
 
        pdftk $pdfs output "$basename$(printf "%03d" $start).pdf" \