diff options
Diffstat (limited to 'home-manager/packages/scripts')
-rwxr-xr-x | home-manager/packages/scripts/apps/con2pdf | 20 |
1 files changed, 13 insertions, 7 deletions
diff --git a/home-manager/packages/scripts/apps/con2pdf b/home-manager/packages/scripts/apps/con2pdf index 334749ab..a3e45e29 100755 --- a/home-manager/packages/scripts/apps/con2pdf +++ b/home-manager/packages/scripts/apps/con2pdf @@ -54,17 +54,23 @@ scan() { cd "$tiff_temp_path" || die "Bug" msg "Started scanning..."; - for i in $(seq "$number_of_pages");do + if [ "$method" = "Flatbed" ]; then do_until_success \ - "scanimage --format=tiff --progress --source='$method' --device='$device' --batch=%d.tif --batch-increment='$number_of_pages' --batch-start='$i'" \ + "scanimage --format=tiff --progress --source='$method' --device='$device' --output-file=1.tiff" \ "warn 'Retrying scan, as we assume a network error!'" + else + for i in $(seq "$number_of_pages");do + do_until_success \ + "scanimage --format=tiff --progress --source='$method' --device='$device' --batch=%d.tif --batch-increment='$number_of_pages' --batch-start='$i'" \ + "warn 'Retrying scan, as we assume a network error!'" - if [ "$number_of_pages" -ne 1 ];then - msg "Finished turn, please change side!"; - readp "Press enter to continue" noop - fi - done + if [ "$number_of_pages" -ne 1 ];then + msg "Finished turn, please change side!"; + readp "Press enter to continue" noop + fi + done + fi msg "Creating output directory..."; mkdir "$output_directory"; |