--- pct-scanner-scripts-0.0.4.orig/pct-scanner-script
+++ pct-scanner-scripts-0.0.4/pct-scanner-script
@@ -111,7 +111,7 @@
     echo "  example --lineart --config mystyle0 will use the section"
     echo "  [lineart-mystyle0] in the configuration files. There is also an"
     echo "  OPEN=COMMAND option in the configuration file to open the combined"
-    echo "  output file with a program of own choice, when the scan is done"
+    echo "  output file with a program of own choice, when the scan is done."
     echo
     echo "  The config system uses a priority based cascading system, the"
     echo "  command arguments options will overwrite the settings found in"
@@ -121,27 +121,27 @@
     echo
     echo "Description:"
     echo "  Easy scan and create merged DjVu and PDF documents for archiving"
-    echo "  This package contains a script and configuration system to easy"
+    echo "  This package contains a script and configuration system to easily"
     echo "  scan documents and create a digital archiving. It can create DjVu"
-    echo "  PDF and JPEG outputs, in merged and single files. It also has a"
-    echo "  configuration file system where different configurations can be"
-    echo "  defined, this makes it easy to switching between configurations."
-    echo "  The script is designed for productivity."
+    echo "  PDF and JPEG outputs, in merged and individual files. It also has"
+    echo "  a configuration file system where different configurations can be"
+    echo "  defined, making it easy to switch between configurations. The "
+    echo "  script is designed for productivity."
     echo
     echo "Features:"
-    echo "  - auto archiving, in merged and singe DjVu, PDF, and JPEG files"
+    echo "  - auto archiving in merged and individual DjVu, PDF, and JPEG files"
     echo "  - auto and manual resume when scanning somehow fails"
     echo "  - cascading configuration system, for easy customizing"
-    echo "  - easy command line style bash program, with useful options"
-    echo "  - archiving made possible with both adf and normal scanners"
-    echo "  - build for productivity and daily use"
+    echo "  - easy command-line-style bash program, with useful options"
+    echo "  - archiving made possible with both adf and flatbed scanners"
+    echo "  - built for productivity and daily use"
     echo "  - uses bash, scanadf and other mainstream processing tools"
-    echo "  - multilanguage commandline output"
+    echo "  - multilanguage commandline output."
     echo
     echo "  This program is a helper script to easy scan and automated digital"
     echo "  document archiving for normal and adf scanners. You can debug this"
     echo "  script by running it as bash -x pct-scanner-script [options]. The"
-    echo "  script is just a nice wrapper for the scanadf, DjVu and PDF tools"
+    echo "  script is just a nice wrapper for the scanadf, DjVu and PDF tools."
     echo
     echo "Website:"
     echo "  https://secure.powercraft.nl/svn/packages/"
@@ -179,7 +179,8 @@
     then
         mkdir --parents "$OUTDIR"/scanscript/
     fi
-    scanbusy=$(mktemp -p "$OUTDIR"/scanscript/ .scanbusy.txt)
+    scanbusy="$OUTDIR"/scanscript/.scanbusy.txt
+    touch "$scanbusy"
     trap "rm -f $scanbusy" 0 1 2 3 15
 }
 
@@ -192,8 +193,8 @@
 function process_busy_scan()
 {
     seconds=0
-    scanbusy="$OUTDIR"/scanscript/.processbusy.txt
-    while [ -e "$scanbusy" ]
+    processbusy="$OUTDIR"/scanscript/.processbusy.txt
+    while [ -e "$processbusy" ]
     do
         /bin/sleep 3
         seconds=$(($seconds+3))
