]> git.donarmstrong.com Git - bin.git/blobdiff - dropbox_to_read
delete the annot file if it has size 0
[bin.git] / dropbox_to_read
index 7ea896ad6886801a2866356f1d3a815ca9af5bcc..be05ca0877bc759c480bf8c476d47df9f2117a70 100755 (executable)
@@ -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"