]> git.ipfire.org Git - thirdparty/gnulib.git/commitdiff
gnupload: Implement --version option according to GCS.
authorBruno Haible <bruno@clisp.org>
Sun, 11 Apr 2021 12:25:56 +0000 (14:25 +0200)
committerBruno Haible <bruno@clisp.org>
Sun, 11 Apr 2021 12:25:56 +0000 (14:25 +0200)
* build-aux/gnupload (copyright_year, copyright): New variables.
(--version): Print also a short copyright and license notice.

ChangeLog
build-aux/gnupload

index 2f9c7591510544f515a58de50ab0ed755bc6eee7..6b6111d0675b1cadc430e45ca302e35f705b3449 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,9 @@
 2021-04-11  Bruno Haible  <bruno@clisp.org>
 
+       gnupload: Implement --version option according to GCS.
+       * build-aux/gnupload (copyright_year, copyright): New variables.
+       (--version): Print also a short copyright and license notice.
+
        git-version-gen: Implement --version option according to GCS.
        * build-aux/git-version-gen (version): State the license. Use wording
        from GCS.
index 90e7c8228813e19fd264293d4629dc0cebaa13f6..e7822aed7e4869fe09e11ee461a822ac57f1212e 100755 (executable)
@@ -1,7 +1,7 @@
 #!/bin/sh
 # Sign files and upload them.
 
-scriptversion=2018-05-19.18; # UTC
+scriptversion=2021-04-11.09; # UTC
 
 # Copyright (C) 2004-2021 Free Software Foundation, Inc.
 #
@@ -145,6 +145,12 @@ the build-aux/ directory of the gnulib package
 
 Send patches and bug reports to <bug-gnulib@gnu.org>."
 
+copyright_year=`echo "$scriptversion" | sed -e 's/[^0-9].*//'`
+copyright="Copyright (C) ${copyright_year} Free Software Foundation, Inc.
+License GPLv2+: GNU GPL version 2 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."
+
 # Read local configuration file
 if test -r "$conffile"; then
   echo "$0: Reading configuration file $conffile"
@@ -209,7 +215,8 @@ while test -n "$1"; do
       ;;
     --version)
       echo "gnupload $scriptversion"
-      exit $?
+      echo "$copyright"
+      exit 0
       ;;
     --)
       shift