about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorSoispha <soispha@vhack.eu>2023-12-30 19:07:35 +0100
committerSoispha <soispha@vhack.eu>2023-12-30 19:07:35 +0100
commit05fd93a77e71029a57616e56f7f1c26ef72abbdc (patch)
treee49b1f48bcad001749762926eb40ca6ed0afdc0d
parentdocs(hm/pkgs/con2pdf): Add dbg statements (diff)
downloadnixos-config-05fd93a77e71029a57616e56f7f1c26ef72abbdc.tar.gz
nixos-config-05fd93a77e71029a57616e56f7f1c26ef72abbdc.zip
fix(hm/pkgs/con2pdf): Correctly sort and clear inputs
Diffstat (limited to '')
-rw-r--r--hm/soispha/pkgs/scripts/apps/con2pdf8
1 files changed, 4 insertions, 4 deletions
diff --git a/hm/soispha/pkgs/scripts/apps/con2pdf b/hm/soispha/pkgs/scripts/apps/con2pdf
index f0942a5c..56ed613f 100644
--- a/hm/soispha/pkgs/scripts/apps/con2pdf
+++ b/hm/soispha/pkgs/scripts/apps/con2pdf
@@ -92,9 +92,9 @@ process_images_adf() {
             counter=0;
             convert_images_flatbed "$image_cache" "${name}_$pdf_counter" "$output_directory"
             : $((pdf_counter += 1))
-            echo "" > "$image_cache"
+            printf "" > "$image_cache"
         fi
-    done < "$(tmp_pipe fd . "$tiff_temp_path" "|" sort -n)"
+    done < "$(tmp_pipe fd . "$tiff_temp_path" "|" sort -V)"
 }
 
 scan_flatbed() {
@@ -124,9 +124,9 @@ process_images_flatbed() {
         if [ "$counter" = "$number_of_pages" ]; then
             counter=0;
             convert_images_flatbed "$image_cache" "$name" "$output_directory"
-            echo "" > "$image_cache"
+            printf "" > "$image_cache"
         fi
-    done < "$(tmp_pipe fd . "$tiff_temp_path" "|" sort -n)"
+    done < "$(tmp_pipe fd . "$tiff_temp_path" "|" sort -V)"
 }
 convert_images_flatbed() {
     image_cache="$1";