diff options
-rwxr-xr-x | tools/ck-copyright-notice | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/tools/ck-copyright-notice b/tools/ck-copyright-notice index d188f05b4..064698bb6 100755 --- a/tools/ck-copyright-notice +++ b/tools/ck-copyright-notice @@ -18,17 +18,19 @@ err=0 # Note: if paragraphs are reformatted, this may need to be updated. -lgpl="$(sed -n '/version [0-9.]* or any later version/ { +yrx="\([0-9][0-9][0-9][0-9]\)" + +lgpl=$(sed -n "/version [0-9.]* or any later version/ { s/.*version // s/ or.*// p q - }' doc/mpfr.texi)" + }" doc/mpfr.texi) -clyr="$(sed -n '/^r/ { - s/.* | \([0-9][0-9][0-9][0-9]\)-.*/\1/p +clyr=$(sed -n "/^r/ { + s/.* | $yrx-.*/\1/p q - }' ChangeLog)" + }" ChangeLog) # Do not use "find ... | while read file do ... done" because the "do" # part needs to be run in the current shell, and some shells behave in @@ -36,7 +38,7 @@ clyr="$(sed -n '/^r/ { srctests=$(find examples src tests -name '*.[ch]') # Take the copyright notice last year of NEWS file as a reference. -z=$(sed -n 's/^Copyright 2000-\(2015\) Free Software Foundation.*/\1/p' NEWS) +z=$(sed -n "s/^Copyright 2000-$yrx Free Software Foundation.*/\1/p" NEWS) if [ $z -lt $clyr ]; then echo "The copyright year of NEWS is out-of-date." |