From: Don Armstrong Date: Thu, 5 Jan 2017 19:23:35 +0000 (-0800) Subject: delete the annot file if it has size 0 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=e3b0b42558d6ff2d6d9ab799c3db75f48932bf89;hp=14f8ccc34cfd4fc6c01a594b5cb28c88964a24b3;p=bin.git delete the annot file if it has size 0 --- diff --git a/dropbox_to_read b/dropbox_to_read index 7ea896a..be05ca0 100755 --- a/dropbox_to_read +++ b/dropbox_to_read @@ -38,6 +38,10 @@ if [ "$(basename "$0")" == "dropbox_read" ]; then echo "${PDF_FILE}.annot"; (cd "$TMPDIR"; diff -Nura a b ) | qprint --encode --binary > "${PDF_FILE}.annot" + # delete the annot file if it has size 0 + if ! [ -s "${PDF_FILE}.annot" ]; then + rm -f "${PDF_FILE}.annot" + fi; rm -f "$TMPDIR/a/file.pdf" rm -f "$TMPDIR/b/file.pdf" rmdir "$TMPDIR/a" "$TMPDIR/b" "$TMPDIR"