bug-gnulib
[Top][All Lists]
Advanced

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

[PATCH] git-version-gen: fix --version copyright year


From: Paul Eggert
Subject: [PATCH] git-version-gen: fix --version copyright year
Date: Tue, 5 Mar 2019 15:06:13 -0800

* build-aux/git-version-gen, build-aux/move-if-change (version):
--version output copyright year is now taken from script year,
so that it no longer needs to be updated by hand.
---
 ChangeLog                 | 7 +++++++
 build-aux/git-version-gen | 3 ++-
 build-aux/move-if-change  | 3 ++-
 3 files changed, 11 insertions(+), 2 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 96083f3ea..e5ba15719 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2019-03-05  Paul Eggert  <address@hidden>
+
+       git-version-gen: fix --version copyright year
+       * build-aux/git-version-gen, build-aux/move-if-change (version):
+       --version output copyright year is now taken from script year,
+       so that it no longer needs to be updated by hand.
+
 2019-03-04  Bruno Haible  <address@hidden>
 
        relocatable-prog: Use wrapper-free installation on Mac OS X, take 2.
diff --git a/build-aux/git-version-gen b/build-aux/git-version-gen
index 3b7009733..45b5656e6 100755
--- a/build-aux/git-version-gen
+++ b/build-aux/git-version-gen
@@ -72,9 +72,10 @@ scriptversion=2018-03-07.03; # UTC
 
 me=$0
 
+year=`expr "$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."
diff --git a/build-aux/move-if-change b/build-aux/move-if-change
index 9538fdbac..9073f1a50 100755
--- a/build-aux/move-if-change
+++ b/build-aux/move-if-change
@@ -36,9 +36,10 @@ The variable CMPPROG can be used to specify an alternative 
to 'cmp'.
 
 Report bugs to <address@hidden>."
 
+year=`expr "$VERSION" : '\([^-]*\)'`
 version=`expr "$VERSION" : '\([^ ]*\)'`
 version="move-if-change (gnulib) $version
-Copyright (C) 2011 Free Software Foundation, Inc.
+Copyright $year Free Software Foundation, Inc.
 License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl.html>
 This is free software: you are free to change and redistribute it.
 There is NO WARRANTY, to the extent permitted by law."
-- 
2.20.1




reply via email to

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