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" \
createmultipdfs()
{
- local basename="multi"
+ local basename="multi-$$"
local startcount=1
local endcount=1
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" \
--format=tiff \
--batch-count=$pagecount \
--batch-increment=1 \
- --batch=scanned%03d.tiff \
+ --batch=scanned-$$-%03d.tiff \
|| errlog "scan error" \
|| return $?