]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
Shorten the snapshot version string by removing the "g".
authorJim Meyering <jim@meyering.net>
Thu, 30 Aug 2007 21:13:06 +0000 (23:13 +0200)
committerJim Meyering <jim@meyering.net>
Thu, 30 Aug 2007 21:13:12 +0000 (23:13 +0200)
* build-aux/git-version-gen: Remove git-describe's "g" that would
always precede the abbreviated SHA1.  Suggestion from Dmitry V. Levin.

ChangeLog
build-aux/git-version-gen

index a6436367588113bb0da6992feed3d999260dd959..a5b1c8bfc1125780a1996107cd74b581beacb2d8 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,9 @@
 2007-08-30  Jim Meyering  <jim@meyering.net>
 
+       Shorten the snapshot version string by removing the "g".
+       * build-aux/git-version-gen: Remove git-describe's "g" that would
+       always precede the abbreviated SHA1.  Suggestion from Dmitry V. Levin.
+
        Perform the s,rm,/bin/rm, fix-up properly.  No more kludge.
        * Makefile.am (EXTRA_DIST): Remove .kludge-stamp.
        (.kludge-stamp): Remove rule.  Instead, ...
index 4a631116b81a1442fba34b19601576499fe6db48..0fe5f3688508f5ba00eb43b6dbf066bfb43d7b6b 100755 (executable)
@@ -38,7 +38,8 @@ elif test -d .git \
         *) (exit 1) ;;
        esac
 then
-    v=`echo "$v" | sed 's/-/./g'`;
+    # Remove the "g" in git-describe's output string; change each - to a '.'
+    v=`echo "$v" | sed 's/\(.*\)-g/\1-/;s/-/./g'`;
 else
     v=$default_version
 fi