summaryrefslogtreecommitdiff
path: root/scraper/pdf_dump_first_page.sh
diff options
context:
space:
mode:
Diffstat (limited to 'scraper/pdf_dump_first_page.sh')
-rw-r--r--scraper/pdf_dump_first_page.sh8
1 files changed, 7 insertions, 1 deletions
diff --git a/scraper/pdf_dump_first_page.sh b/scraper/pdf_dump_first_page.sh
index 2749915d..6277d40c 100644
--- a/scraper/pdf_dump_first_page.sh
+++ b/scraper/pdf_dump_first_page.sh
@@ -6,7 +6,13 @@ for i in datasets/s2/pdf/*/*/*.pdf
if [[ ! -e $OUTPUT ]]
then
pdf2txt.py -p 1 $i > $OUTPUT
- echo $OUTPUT
+ if [ -s $OUTPUT ]
+ then
+ echo "found $OUTPUT"
+ else
+ echo "rm empty $OUTPUT"
+ rm -f $OUTPUT
+ fi
else
if [ -s $OUTPUT ]
then