>From 893a10822645300c26e67d54732ec564deabcf3f Mon Sep 17 00:00:00 2001 From: Bruno Haible Date: Sun, 11 Apr 2021 14:28:00 +0200 Subject: [PATCH 5/6] libtool-next-version: Implement --version option according to GCS. * build-aux/libtool-next-version (scriptversion): New variable. (func_version): Deduce the copyright year from it. Terminate sentences with '.'. --- ChangeLog | 5 +++++ build-aux/libtool-next-version | 12 ++++++++---- 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index 6b6111d..1006e25 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,10 @@ 2021-04-11 Bruno Haible + libtool-next-version: Implement --version option according to GCS. + * build-aux/libtool-next-version (scriptversion): New variable. + (func_version): Deduce the copyright year from it. Terminate sentences + with '.'. + gnupload: Implement --version option according to GCS. * build-aux/gnupload (copyright_year, copyright): New variables. (--version): Print also a short copyright and license notice. diff --git a/build-aux/libtool-next-version b/build-aux/libtool-next-version index 66e3b77..657f513 100755 --- a/build-aux/libtool-next-version +++ b/build-aux/libtool-next-version @@ -42,6 +42,8 @@ # - It does not enforce that applying the third or fourth rule is only # possible after applying the second rule. +scriptversion=2021-04-11 + # func_usage # outputs to stdout the --help usage message. func_usage () @@ -68,12 +70,14 @@ Report bugs to ." # outputs to stdout the --version message. func_version () { - echo "libtool-next-version (GNU gnulib)" - echo "Copyright (C) 2019 Free Software Foundation, Inc. -License GPLv3+: GNU GPL version 3 or later + copyright_year=`echo "$scriptversion" | sed -e 's/[^0-9].*//'` + echo "libtool-next-version (GNU gnulib) $scriptversion" + echo "Copyright (C) ${copyright_year} Free Software Foundation, Inc. +License GPLv3+: GNU GPL version 3 or later . This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law." - echo "Written by" "Bruno Haible" + echo + printf 'Written by %s.\n' "Bruno Haible" } # func_fatal_error message -- 2.7.4