]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
Change the first '-' to '.' in the snapshot version string,
authorJim Meyering <meyering@redhat.com>
Sat, 3 Nov 2007 16:46:42 +0000 (17:46 +0100)
committerJim Meyering <meyering@redhat.com>
Sat, 3 Nov 2007 16:46:42 +0000 (17:46 +0100)
e.g., 6.9-377-08144 -> 6.9.377-08144
* build-aux/git-version-gen: ... and add comments.

ChangeLog
build-aux/git-version-gen

index 4d931f3c36caae8b4e9370c1a2d2f44b887de579..ca1ac5d38cf7110e7c2f3eb6470d0a3cd0737f38 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,9 @@
 2007-11-03  Jim Meyering  <meyering@redhat.com>
 
+       Change the first '-' to '.' in the snapshot version string,
+       e.g., 6.9-377-08144 -> 6.9.377-08144
+       * build-aux/git-version-gen: ... and add comments.
+
        seq: add another test for the %% bug.
        * tests/misc/seq (fmt-c): Test the other fixed case, too.
 
index c433c262d25e2ee9dc0ba34ab93cdc4aed712607..4e8ffc6eafc41c3fc30bb071ff8dd0c715bcc08d 100755 (executable)
@@ -42,8 +42,9 @@ elif test -d .git \
         *) (exit 1) ;;
        esac
 then
-    # Remove the "g" in git-describe's output string.
-    v=`echo "$v" | sed 's/\(.*\)-g/\1-/'`;
+    # Change the first '-' to a '.', so version-comparing tools work properly.
+    # Remove the "g" in git-describe's output string, to save a byte.
+    v=`echo "$v" | sed 's/-/./;s/\(.*\)-g/\1-/'`;
 else
     v=UNKNOWN
 fi