summaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorJonas <dr@jones.dk>2013-06-10 14:20:17 +0200
committerJonas <dr@jones.dk>2013-06-11 18:13:23 +0200
commit160adcd5772d259855c9941200abe1a73df38d7f (patch)
treefa2e215faef9156e8ea904fad388aa03139cd4bf /examples
parent902f5a300d25f4909a8399dce53207e5b30c835f (diff)
Fix cleanup tempfile on no-diff exit.
Diffstat (limited to 'examples')
-rwxr-xr-xexamples/mkevents2
-rwxr-xr-xexamples/mkhours2
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