autoconf-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

s/-/./ in snapshot version string: 2.61a-256-8b556 -> 2.61a.256-8b556


From: Jim Meyering
Subject: s/-/./ in snapshot version string: 2.61a-256-8b556 -> 2.61a.256-8b556
Date: Sat, 03 Nov 2007 22:58:24 +0100

I've just pushed this:

 ChangeLog                 |    3 +++
 build-aux/git-version-gen |   31 +++++++++++++++++++++++++++++--
 2 files changed, 32 insertions(+), 2 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index d1eece0..d52ab6c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
 2007-11-03  Jim Meyering  <address@hidden>

+       s/-/./ in snapshot version string: 2.61a-256-8b556 -> 2.61a.256-8b556
+       * build-aux/git-version-gen: This syncs from coreutils.
+
        Adjust the build procedure so "make check" works reliably.
        * README-hacking: Include an extra step between "make" and
        "make check" to ensure that the latter passes.
diff --git a/build-aux/git-version-gen b/build-aux/git-version-gen
index 78635f5..5f86625 100755
--- a/build-aux/git-version-gen
+++ b/build-aux/git-version-gen
@@ -1,5 +1,24 @@
 #!/bin/sh
 # Print a version string.
+scriptversion=2007-11-03.22
+
+# Copyright (C) 2007 Free Software Foundation
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
+
 # This script is derived from GIT-VERSION-GEN from GIT: http://git.or.cz/.
 # It may be run two ways:
 # - from a git repository in which the git-describe command below
@@ -40,8 +59,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
@@ -63,3 +83,10 @@ esac

 # Omit the trailing newline, so that m4_esyscmd can use the result directly.
 echo "$v" | tr -d '\012'
+
+# Local variables:
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "scriptversion="
+# time-stamp-format: "%:y-%02m-%02d.%02H"
+# time-stamp-end: "$"
+# End:
--
1.5.3.5.529.ge3d6d




reply via email to

[Prev in Thread] Current Thread [Next in Thread]