From d510e7e4aee471c7a167a79c9819e3edbece38b8 Mon Sep 17 00:00:00 2001 From: fritz-hh Date: Wed, 24 Sep 2014 23:43:37 +0200 Subject: [PATCH] prevent new spurious jhove message to be displayed --- OCRmyPDF.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/OCRmyPDF.sh b/OCRmyPDF.sh index 164b2ffa..2b831153 100755 --- a/OCRmyPDF.sh +++ b/OCRmyPDF.sh @@ -267,7 +267,8 @@ ret_code="$?" # validate generated pdf file (compliance to PDF/A) [ $VERBOSITY -ge $LOG_DEBUG ] && echo "Output file: Checking compliance to PDF/A standard" -java -jar "$JHOVE" -c "$JHOVE_CFG" -m PDF-hul "$FILE_OUTPUT_PDFA" > "$FILE_VALIDATION_LOG" +! java -jar "$JHOVE" -c "$JHOVE_CFG" -m PDF-hul "$FILE_OUTPUT_PDFA" 2> /dev/null 1> "$FILE_VALIDATION_LOG" \ + && echo "Unexpected error while checking compliance to PDF/A file. Exiting..." && exit $EXIT_OTHER_ERROR grep -i "Status|Message" "$FILE_VALIDATION_LOG" # summary of the validation [ $VERBOSITY -ge $LOG_DEBUG ] && echo "The full validation log is available here: \"$FILE_VALIDATION_LOG\"" # check the validation results