r23670: Fix mkversion.sh for the git case: Only use the first line where
authorVolker Lendecke <vlendec@samba.org>
Sun, 1 Jul 2007 19:11:40 +0000 (19:11 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 17:23:44 +0000 (12:23 -0500)
"commit" occurs
(This used to be commit 0e9aeec37008e5b882ce91c44ee201ef779ecabe)

source3/script/mkversion.sh

index cfd6b506d490c271f3456acded5e3e0d6f7ccdb8..e87d5ba72e119e20d3e4dfdf8e829b4084a29a78 100755 (executable)
@@ -107,7 +107,7 @@ if test x"${SAMBA_VERSION_IS_SVN_SNAPSHOT}" = x"yes";then
     if test x"${HAVEVER}" != x"yes";then
        HAVEGIT=no
         GIT_INFO=`git show --abbrev-commit HEAD 2>/dev/null`
-       TMP_REVISION=`echo -e "${GIT_INFO}" | grep 'commit ' |sed -e 's/commit \([0-9a-f]*\).*/\1/'`
+       TMP_REVISION=`echo -e "${GIT_INFO}" | grep 'commit ' | sed 1q |sed -e 's/commit \([0-9a-f]*\).*/\1/'`
        if test -n "$TMP_REVISION";then
            HAVEGIT=yes
             HAVEVER=yes