>From fd6f32a849f159d6063869ebeb7f29e9c7b0736f Mon Sep 17 00:00:00 2001 From: Bruno Haible Date: Sun, 11 Apr 2021 14:20:08 +0200 Subject: [PATCH 2/6] bootstrap: Implement --version option according to GCS. * build-aux/bootstrap (copyright_year, copyright): New variables. (--version): New option processing. --- ChangeLog | 4 ++++ build-aux/bootstrap | 14 +++++++++++++- 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index d6e0f72..dc08f18 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,9 @@ 2021-04-11 Bruno Haible + bootstrap: Implement --version option according to GCS. + * build-aux/bootstrap (copyright_year, copyright): New variables. + (--version): New option processing. + announce-gen: Implement --version option according to GCS. * build-aux/announce-gen (copyright_year): New variable. (GetOptions): Print also a short copyright and license notice and diff --git a/build-aux/bootstrap b/build-aux/bootstrap index c17a36f..7336598 100755 --- a/build-aux/bootstrap +++ b/build-aux/bootstrap @@ -1,6 +1,6 @@ #! /bin/sh # Print a version string. -scriptversion=2021-01-10.00; # UTC +scriptversion=2021-04-11.09; # UTC # Bootstrap this package from checked-out sources. @@ -115,6 +115,12 @@ Running without arguments will suffice in most cases. EOF } +copyright_year=`echo "$scriptversion" | sed -e 's/[^0-9].*//'` +copyright="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." + # warnf_ FORMAT-STRING ARG1... warnf_ () { @@ -337,6 +343,12 @@ do --help) usage exit;; + --version) + set -e + echo "bootstrap $scriptversion" + echo "$copyright" + exit 0 + ;; --gnulib-srcdir=*) GNULIB_SRCDIR=${option#--gnulib-srcdir=};; --skip-po) -- 2.7.4