summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNick White <git@njw.name>2019-07-15 16:10:59 +0100
committerNick White <git@njw.name>2019-07-15 16:10:59 +0100
commite99fd516431e146935557f41882cd4729073b120 (patch)
tree9904437adf90c4d795138783b12a20029628c8a8
parente010d0b02bfa6525dc81738f039cb2911b21cec3 (diff)
fix more eebotopdf bugs; hopefully more resiliant now
-rw-r--r--eebotopdf.sh4
1 files changed, 2 insertions, 2 deletions
diff --git a/eebotopdf.sh b/eebotopdf.sh
index 4143571..7fac4c0 100644
--- a/eebotopdf.sh
+++ b/eebotopdf.sh
@@ -31,7 +31,7 @@ echo "Extracting images from original PDF"
pdfimages -png "$1" "$t/$root" || exit 1
for i in "$t/$root"*png; do
b=`basename "$i" .png`
- $convert "$i" "$t/$b.jpg" || exit 1
+ "$convert" "$i" "$t/$b.jpg" || exit 1
rm "$i"
done
@@ -41,7 +41,7 @@ eeboxmltohocr "$2" "$t/$root" || exit 1
# remove any images that don't have a corresponding hocr
for i in "$t/"*jpg; do
b=`basename "$i" .jpg`
- test -f "$b.hocr" || rm "$i"
+ test -f "$t/$b.hocr" || rm "$i"
done
echo "Combining images and text into PDF"