]> git.ipfire.org Git - thirdparty/git.git/commitdiff
Meta/Make: clean "version" file
authorJunio C Hamano <gitster@pobox.com>
Thu, 27 Dec 2007 03:15:32 +0000 (19:15 -0800)
committerJunio C Hamano <gitster@pobox.com>
Thu, 27 Dec 2007 03:15:32 +0000 (19:15 -0800)
Make

diff --git a/Make b/Make
index 3b9d9f2d1b56f9ea1f4c63abe0d4f3cc44293e7f..29483d2acf06180d7c841ac8ff1cc1462c115818 100755 (executable)
--- a/Make
+++ b/Make
@@ -64,7 +64,9 @@ do
        shift
 done
 
-$GIT describe --abbrev=4 HEAD | sed -e 's/-/./g' >version
+sh -c 'git describe --abbrev=4 HEAD' >/dev/null 2>&1 || {
+       $GIT describe --abbrev=4 HEAD | sed -e 's/-/./g' >version
+}
 
 make $d \
      GITWEB_CONFIG=$G \
@@ -72,3 +74,5 @@ make $d \
      ETC_GITCONFIG=$d/etc/gitconfig \
      CFLAGS="$O -Wall -Wdeclaration-after-statement -g" \
      "$@"
+
+rm -f version