Broke my_seq out to its own file (it handles the lack of seq on mac os x and the...
authorDaniel Axtens <[email protected]>
Fri, 8 Apr 2011 07:46:33 +0000 (15:46 +0800)
committerDaniel Axtens <[email protected]>
Fri, 8 Apr 2011 07:46:33 +0000 (15:46 +0800)
detect2pages.sh
my_seq.sh [new file with mode: 0644]
scan2pages.sh

index 4b8c189..540b08b 100755 (executable)
@@ -2,6 +2,7 @@
 
 #should probably have given up on shell and gone over to python.
 
+source $(dirname $0)/my_seq.sh
 
 infile=$1
 pg=$2
@@ -12,7 +13,7 @@ dir=$(dirname $infile)
 convert -blur 10 -gamma 0.00001 -median 1 $infile -resize 1x601\! -gamma 0.3 $dir/strip-${pg}-${subpg}.png
 
 #There seems to be a definte bias in my reader scans for things to be in the top part rather than the bottom part
-testpoints=`jot - 270 320`
+testpoints=`$my_seq 270 320`
 
 sum=0
 prev=0
diff --git a/my_seq.sh b/my_seq.sh
new file mode 100644 (file)
index 0000000..400a28f
--- /dev/null
+++ b/my_seq.sh
@@ -0,0 +1,6 @@
+# Mac OS X doesn't have seq. It has jot instead.
+Linux_seq="seq"
+Darwin_seq="jot -"
+if [[ $(uname) == "Darwin" ]]; then my_seq=$Darwin_seq;
+else my_seq=$Linux_seq;
+fi;
index 5cacfe6..9c08f6a 100755 (executable)
@@ -22,13 +22,7 @@ __EOF__
 }
 
 ## Setup and utilities ##
-# Mac OS X doesn't have seq. It has jot instead.
-Linux_seq="seq"
-Darwin_seq="jot -"
-if [[ $(uname) == "Darwin" ]]; then my_seq=$Darwin_seq;
-else my_seq=$Linux_seq;
-fi;
-
+source $(dirname $0)/my_seq.sh
 
 ## Process flags ##
 forcepdf=

UCC git Repository :: git.ucc.asn.au