summaryrefslogtreecommitdiff
path: root/build-aux/libtool-next-version
diff options
context:
space:
mode:
authorBruno Haible <bruno@clisp.org>2021-04-11 14:28:00 +0200
committerBruno Haible <bruno@clisp.org>2021-04-11 14:28:00 +0200
commit893a10822645300c26e67d54732ec564deabcf3f (patch)
tree3bfa26d5a9256e95495175240ab52a0645ca8e5e /build-aux/libtool-next-version
parent8bd125ff4b6e2f34a754bf1adcf4c75a7630cfef (diff)
downloadgnulib-893a10822645300c26e67d54732ec564deabcf3f.tar.gz
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 '.'.
Diffstat (limited to 'build-aux/libtool-next-version')
-rwxr-xr-xbuild-aux/libtool-next-version12
1 files changed, 8 insertions, 4 deletions
diff --git a/build-aux/libtool-next-version b/build-aux/libtool-next-version
index 66e3b7755f..657f5133cc 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 <bruno@clisp.org>."
# 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 <https://gnu.org/licenses/gpl.html>
+ 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 <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."
- echo "Written by" "Bruno Haible"
+ echo
+ printf 'Written by %s.\n' "Bruno Haible"
}
# func_fatal_error message