diff options
author | Nick White <git@njw.name> | 2019-05-15 16:03:45 +0100 |
---|---|---|
committer | Nick White <git@njw.name> | 2019-05-15 16:03:45 +0100 |
commit | f5c119a9a8040bd42de908eebcbe2f68ce85c11b (patch) | |
tree | 59fbd4bde4f7cb11309fd9a86d1bf3cfd2625a67 /fullocrdir.sh | |
parent | 28091bd3a22de816aa12c8e96636384d9a516fea (diff) |
Adjust fullocrdir.sh to latest version of pgconf
Diffstat (limited to 'fullocrdir.sh')
-rwxr-xr-x | fullocrdir.sh | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/fullocrdir.sh b/fullocrdir.sh index ce58ff0..d68d2cc 100755 --- a/fullocrdir.sh +++ b/fullocrdir.sh @@ -48,7 +48,7 @@ find "$1" -maxdepth 1 -type f -name '*.hocr' | while read f; do b=`basename "$f" .hocr` d=`dirname "$f"` - pgconf "$f" > "$d/$b.conf" || rm -f "$d/$b.conf" + pgconf "$f" > "$d/$b.conf" 2>/dev/null || rm -f "$d/$b.conf" done echo "Best" @@ -60,8 +60,8 @@ find "$1" -maxdepth 1 -type f -name '*.jpg' | while read f; do best=0 bestfn="" for c in "$d/$b"*conf; do + test ! -f "$c" && continue conf=`cat "$c"` - test "$conf" = "No lines found" && continue if test $conf -gt $best; then best=$conf bestfn="$c" |