]> git.pond.sub.org Git - empserver/commitdiff
build-aux/git-version-gen: Refresh from Gnulib commit 4f78c231f4
authorMarkus Armbruster <armbru@pond.sub.org>
Sat, 26 Dec 2020 07:34:33 +0000 (08:34 +0100)
committerMarkus Armbruster <armbru@pond.sub.org>
Sat, 23 Jan 2021 06:08:03 +0000 (07:08 +0100)
Signed-off-by: Markus Armbruster <armbru@pond.sub.org>
build-aux/git-version-gen

index e77d5e91d8410bcd18151b593bce1ee6b47d5175..f4e85924f5803510450fa3f97fecb9ade094f042 100755 (executable)
@@ -1,8 +1,8 @@
 #!/bin/sh
 # Print a version string.
 #!/bin/sh
 # Print a version string.
-scriptversion=2017-08-07.06; # UTC
+scriptversion=2019-10-13.15; # UTC
 
 
-# Copyright (C) 2007-2018 Free Software Foundation, Inc.
+# Copyright (C) 2007-2020 Free Software Foundation, Inc.
 #
 # 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
 #
 # 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
@@ -15,9 +15,9 @@ scriptversion=2017-08-07.06; # UTC
 # GNU General Public License for more details.
 #
 # You should have received a copy of the GNU General Public License
 # 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, see <http://www.gnu.org/licenses/>.
+# along with this program.  If not, see <https://www.gnu.org/licenses/>.
 
 
-# This script is derived from GIT-VERSION-GEN from GIT: http://git.or.cz/.
+# This script is derived from GIT-VERSION-GEN from GIT: https://git-scm.com/.
 # It may be run two ways:
 # - from a git repository in which the "git describe" command below
 #   produces useful output (thus requiring at least one signed tag)
 # It may be run two ways:
 # - from a git repository in which the "git describe" command below
 #   produces useful output (thus requiring at least one signed tag)
@@ -72,9 +72,10 @@ scriptversion=2017-08-07.06; # UTC
 
 me=$0
 
 
 me=$0
 
+year=`expr "$scriptversion" : '\([^-]*\)'`
 version="git-version-gen $scriptversion
 
 version="git-version-gen $scriptversion
 
-Copyright 2011 Free Software Foundation, Inc.
+Copyright $year Free Software Foundation, Inc.
 There is NO warranty.  You may redistribute this software
 under the terms of the GNU General Public License.
 For more information about these matters, see the files named COPYING."
 There is NO warranty.  You may redistribute this software
 under the terms of the GNU General Public License.
 For more information about these matters, see the files named COPYING."
@@ -141,11 +142,9 @@ then
     v=`cat $tarball_version_file` || v=
     case $v in
         *$nl*) v= ;; # reject multi-line output
     v=`cat $tarball_version_file` || v=
     case $v in
         *$nl*) v= ;; # reject multi-line output
-        [0-9]*) ;;
-        *) v= ;;
     esac
     test "x$v" = x \
     esac
     test "x$v" = x \
-        && echo "$0: WARNING: $tarball_version_file is missing or damaged" 1>&2
+        && echo "$0: WARNING: $tarball_version_file is damaged" 1>&2
 fi
 
 if test "x$v" != x
 fi
 
 if test "x$v" != x
@@ -167,7 +166,8 @@ then
     # tag or the previous older version that did not?
     #   Newer: v6.10-77-g0f8faeb
     #   Older: v6.10-g0f8faeb
     # tag or the previous older version that did not?
     #   Newer: v6.10-77-g0f8faeb
     #   Older: v6.10-g0f8faeb
-    case ${v#-g*} in
+    vprefix=`expr "X$v" : 'X\(.*\)-g[^-]*$'` || vprefix=$v
+    case $vprefix in
         *-*) : git describe is probably okay three part flavor ;;
         *)
             : git describe is older two part flavor
         *-*) : git describe is probably okay three part flavor ;;
         *)
             : git describe is older two part flavor
@@ -218,7 +218,7 @@ fi
 printf %s "$v"
 
 # Local variables:
 printf %s "$v"
 
 # Local variables:
-# eval: (add-hook 'write-file-hooks 'time-stamp)
+# eval: (add-hook 'before-save-hook 'time-stamp)
 # time-stamp-start: "scriptversion="
 # time-stamp-format: "%:y-%02m-%02d.%02H"
 # time-stamp-time-zone: "UTC0"
 # time-stamp-start: "scriptversion="
 # time-stamp-format: "%:y-%02m-%02d.%02H"
 # time-stamp-time-zone: "UTC0"