]> gitweb.hhaalo.de Git - scantopdf.git/commitdiff
change multi order
authorBastian Dehn <hhaalo@arcor.de>
Fri, 21 Nov 2025 19:12:39 +0000 (20:12 +0100)
committerBastian Dehn <hhaalo@arcor.de>
Fri, 21 Nov 2025 19:12:39 +0000 (20:12 +0100)
src/scanbasic.sh

index cbf9287bcfc408ce23894445abb4d28c3cc854da..c46ff553b38b4ec357cbc054cb23f288ac2e081a 100644 (file)
@@ -170,11 +170,15 @@ createmultipdfs()
                || errlog "missing basename" \
                || return $?
 
-       find scanned-$$-*.tiff | parallel tiff2pdf {} -o {.}.pdf
+       find scanned-$$-*.tiff \
+               | sort \
+               | parallel --keep-order tiff2pdf {} -o {.}.pdf
        rm scanned-$$-*.tiff
        export -f addocr
        export -f optimize
-       find . -name "scanned-$$-*.pdf" | parallel addocr {}
+       find . -name "scanned-$$-*.pdf" \
+               | sort \
+               | parallel --keep-order addocr {}
 
        local startcount=1
        local endcount=1