X-Git-Url: https://git.ucc.asn.au/?p=dja%2Fscandal.git;a=blobdiff_plain;f=scan2pages.sh;h=9c08f6a0552a13c08328dee1419f846b67fbdb19;hp=b129963b7effba28a49baac6f935be08c7102e9b;hb=17f116bd1a594a9c8c222757169360068e443ca4;hpb=13a56d0f2178dd64270ae0b9d6e2994de42e9c07 diff --git a/scan2pages.sh b/scan2pages.sh index b129963..9c08f6a 100755 --- a/scan2pages.sh +++ b/scan2pages.sh @@ -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= @@ -162,8 +156,6 @@ for pg in `$my_seq 1 $pages`; do # check it hasn't mostly disappeared - e.g. if the scan was all black # (e.g. forgot to put the book down when you first hit scan) - # ... not sure why such a convoluted form is required. expr doesn't like - # processing a convert -format "%w * %h" or any variant thereof if [[ $(convert $preppnm -format '%[fx:s.w*s.h>1000]' info:) = "0" ]]; then [[ $verbose == 1 ]] && echo "Discarding pg ${pgn}: not enough remains after masking." continue;