From 160adcd5772d259855c9941200abe1a73df38d7f Mon Sep 17 00:00:00 2001 From: Jonas Date: Mon, 10 Jun 2013 14:20:17 +0200 Subject: Fix cleanup tempfile on no-diff exit. --- examples/mkevents | 2 +- examples/mkhours | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/mkevents b/examples/mkevents index 0c25233..4386486 100755 --- a/examples/mkevents +++ b/examples/mkevents @@ -40,7 +40,7 @@ if [ -f $outfile ]; then errorcode=0 diff -ruN $outfile $outfile~ || errorcode=$? case $errorcode in - 0) echo "No changes from previous version"; exit;; + 0) echo "No changes from previous version"; rm $outfile~; exit;; 1) printf "Above are changes from previous version. ";; *) echo >&2 "ERROR: internal diff error!"; exit $errorcode;; esac diff --git a/examples/mkhours b/examples/mkhours index 1e0168a..d9c8459 100755 --- a/examples/mkhours +++ b/examples/mkhours @@ -40,7 +40,7 @@ if [ -f $outfile ]; then errorcode=0 diff -ruN $outfile $outfile~ || errorcode=$? case $errorcode in - 0) echo "No changes from previous version"; exit;; + 0) echo "No changes from previous version"; rm $outfile~; exit;; 1) printf "Above are changes from previous version. ";; *) echo >&2 "ERROR: internal diff error!"; exit $errorcode;; esac -- cgit v1.2.3