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

index 8b938fad92e9cca86352627130de2c7c3d089405..b0dd06e3d85cc0bea25541950bf3d6565c19bd9f 100644 (file)
@@ -83,7 +83,7 @@ createonepdf()
 
        local output_pdf=
        local tiff=
-       for tiff in scanned*.tiff; do
+       for tiff in scanned-$$-*.tiff; do
                output_pdf=${tiff/.tiff/.pdf}
                tiff2pdf $tiff -o $output_pdf \
                        || errlog "could not convert tiff to pdf" \
@@ -158,7 +158,7 @@ detectsplit()
 
 createmultipdfs()
 {
-       local basename="multi"
+       local basename="multi-$$"
        local startcount=1
        local endcount=1
 
@@ -168,7 +168,7 @@ createmultipdfs()
 
        local pdf=
        local tiff=
-       for tiff in scanned*.tiff; do
+       for tiff in scanned-$$-*.tiff; do
                pdf=${tiff/.tiff/.pdf}
                tiff2pdf $tiff -o $pdf \
                        || errlog "could not convert $tiff to $pdf" \
@@ -268,7 +268,7 @@ scantopdf() {
                --format=tiff \
                --batch-count=$pagecount \
                --batch-increment=1 \
-               --batch=scanned%03d.tiff \
+               --batch=scanned-$$-%03d.tiff \
                || errlog "scan error" \
                || return $?