Ensure to remove temp files.

This commit is contained in:
Jeremy Gardais 2016-11-02 11:41:54 +01:00
parent 27f637f39f
commit 4e8e5f5805
1 changed files with 2 additions and 1 deletions

View File

@ -21,10 +21,11 @@ if [ -f "${WATER_PDF_FILE}" ]; then
command pdftk "${WATER_PDF_FILE}" output "${UNCOMPRESS_PDF_FILE}" uncompress 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/${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 command pdftk "${UNWATER_PDF_FILE}" output "${WATER_PDF_FILE}" compress
rm -f "${UNCOMPRESS_PDF_FILE}" "${UNWATER_PDF_FILE}"
exit 0 exit 0
else else
printf '%s\n' "Error with the first arg: ${1}" printf '%s\n' "Error with the first arg: ${1}"