From f5c119a9a8040bd42de908eebcbe2f68ce85c11b Mon Sep 17 00:00:00 2001 From: Nick White Date: Wed, 15 May 2019 16:03:45 +0100 Subject: Adjust fullocrdir.sh to latest version of pgconf --- fullocrdir.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'fullocrdir.sh') 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" -- cgit v1.2.1-24-ge1ad