Always remove revision.tmp
authorRémi Denis-Courmont <remi@remlab.net>
Sun, 30 Aug 2009 07:51:35 +0000 (10:51 +0300)
committerRémi Denis-Courmont <remi@remlab.net>
Sun, 30 Aug 2009 07:51:35 +0000 (10:51 +0300)
src/Makefile.am

index 2d922ba..888751f 100644 (file)
@@ -513,8 +513,11 @@ stamp-revision:
        rm -f -- revision.tmp
        (git --git-dir="$(top_srcdir)/.git/" describe --tags --long \
                --always || echo exported) > revision.tmp
-       diff revision.tmp revision.txt >/dev/null 2>&1 || \
-       mv -f -- revision.tmp revision.txt
+       if diff revision.tmp revision.txt >/dev/null; then \
+               rm -f -- revision.tmp; \
+       else \
+               mv -f -- revision.tmp revision.txt; \
+       fi 2>&1
 
 ###############################################################################
 # Unit/regression test