diff --git a/remove_pdf_watermark.sh b/remove_pdf_watermark.sh index 48fd379..126452e 100755 --- a/remove_pdf_watermark.sh +++ b/remove_pdf_watermark.sh @@ -21,10 +21,11 @@ if [ -f "${WATER_PDF_FILE}" ]; then command pdftk "${WATER_PDF_FILE}" output "${UNCOMPRESS_PDF_FILE}" uncompress sed -e "s/${OLD_WATER}/${NEW_WATER}/g" "${UNCOMPRESS_PDF_FILE}" >"${UNWATER_PDF_FILE}" - #sed -e "s/UNIVERSITE DE RENNES 1/TEST/g" <"${WATER_PDF_FILE}" >"${UNWATER_PDF_FILE}" command pdftk "${UNWATER_PDF_FILE}" output "${WATER_PDF_FILE}" compress + rm -f "${UNCOMPRESS_PDF_FILE}" "${UNWATER_PDF_FILE}" + exit 0 else printf '%s\n' "Error with the first arg : ${1}"