[gnutls-devel] GnuTLS | New make target 'update-copyright-year' (!1241)

Development of GNU's TLS library gnutls-devel at lists.gnutls.org
Wed Apr 29 19:21:51 CEST 2020




Daiki Ueno commented on a discussion on cfg.mk: https://gitlab.com/gnutls/gnutls/-/merge_requests/1241#note_333921271

>  	echo "If everything looks well, commit the gnulib update with:"
>  	echo "  git commit -m "Update gnulib submodule" gnulib"
>  
> +# Update Copyright year in tools and docs
> +
> +update-copyright-year:
> +	$(AM_V_at)$(SED) -i "s/\"2000-....\"/\"2000-`date +%Y`\"/g" src/args-std.def.in
> +	$(AM_V_at)$(SED) -i "s/ 2001-.... / 2001-`date +%Y` /g" doc/gnutls.texi

I don't see any reason that we can't change it to double dashes, but yes, I agree that it might be overkill.

In that case, however, I would suggest using more generic (but restrictive) substitution, like:
```sh
sed '/^copyright = {/ { n; s/\( *date *= *\)"\([[:digit:]]*\)-\([[:digit:]]*\)"/\1"\2-2021"/ }' src/args-std.def.in

sed 's/\(Copyright @copyright{} \)\([[:digit:]]*\)-\([[:digit:]]*\)/\1\2-2021/' doc/gnutls.texi
```
That would prevent accidental match in the future.

Sorry for bikeshedding :-)

-- 
Reply to this email directly or view it on GitLab: https://gitlab.com/gnutls/gnutls/-/merge_requests/1241#note_333921271
You're receiving this email because of your account on gitlab.com.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.gnupg.org/pipermail/gnutls-devel/attachments/20200429/c168ccff/attachment.html>


More information about the Gnutls-devel mailing list