build-aux/git-version-gen: Refresh from Gnulib commit 4f78c231f4

Signed-off-by: Markus Armbruster <armbru@pond.sub.org>
This commit is contained in:
Markus Armbruster 2020-12-26 08:34:33 +01:00
parent 53591e85d5
commit 10356f9ecf

View file

@ -1,8 +1,8 @@
#!/bin/sh #!/bin/sh
# Print a version string. # 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 # 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 # 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. # GNU General Public License for more details.
# #
# You should have received a copy of the GNU General Public License # 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: # It may be run two ways:
# - from a git repository in which the "git describe" command below # - from a git repository in which the "git describe" command below
# produces useful output (thus requiring at least one signed tag) # 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 There is NO warranty. You may redistribute this software
under the terms of the GNU General Public License. under the terms of the GNU General Public License.
For more information about these matters, see the files named COPYING." For more information about these matters, see the files named COPYING."
@ -141,11 +142,9 @@ then
v=`cat $tarball_version_file` || v= v=`cat $tarball_version_file` || v=
case $v in case $v in
*$nl*) v= ;; # reject multi-line output *$nl*) v= ;; # reject multi-line output
[0-9]*) ;;
*) v= ;;
esac esac
test "x$v" = x \ 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 fi
if test "x$v" != x if test "x$v" != x
@ -167,7 +166,8 @@ then
# tag or the previous older version that did not? # tag or the previous older version that did not?
# Newer: v6.10-77-g0f8faeb # Newer: v6.10-77-g0f8faeb
# Older: v6.10-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 probably okay three part flavor ;;
*) *)
: git describe is older two part flavor : git describe is older two part flavor
@ -218,7 +218,7 @@ fi
printf %s "$v" printf %s "$v"
# Local variables: # Local variables:
# eval: (add-hook 'write-file-hooks 'time-stamp) # eval: (add-hook 'before-save-hook 'time-stamp)
# time-stamp-start: "scriptversion=" # time-stamp-start: "scriptversion="
# time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-format: "%:y-%02m-%02d.%02H"
# time-stamp-time-zone: "UTC0" # time-stamp-time-zone: "UTC0"