texinfo-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[no subject]


From: Gavin D. Smith
Date: Mon, 14 Aug 2023 15:47:34 -0400 (EDT)

branch: master
commit 1f9a4d217449a4c0a45d0400fcc5ff074a989c0e
Author: Gavin Smith <gavinsmith0123@gmail.com>
AuthorDate: Mon Aug 14 20:47:22 2023 +0100

    * README-hacking: start of advice on how to update copyright
    years automatically
---
 ChangeLog      |  5 +++++
 README-hacking | 16 ++++++++++++++++
 2 files changed, 21 insertions(+)

diff --git a/ChangeLog b/ChangeLog
index 841aa191a8..c849ee13cb 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2023-08-14  Gavin Smith <gavinsmith0123@gmail.com>
+
+       * README-hacking: start of advice on how to update copyright
+       years automatically
+
 2023-08-14  Gavin Smith <gavinsmith0123@gmail.com>
 
        * tp/prove.sh: Add a comment stating the purpose of this file (mail
diff --git a/README-hacking b/README-hacking
index 7b6bbd37e2..fa982bf76e 100644
--- a/README-hacking
+++ b/README-hacking
@@ -254,6 +254,22 @@ don't support it are still widespread.
 Not all compiler warnings have to be fixed, though.
 
 
+Check if copyright years in files have all been updated.  It may be
+simplest just to update them all, e.g. in a directory, run
+
+  find . -type f \( -name '*.c' -o -name '*.pm' -o -name '*.h' -o -name '*.sh' 
-o -name Makefile.am \) -execdir perl -wpli -e 's/-20\d\d Free/-2023 Free/' 
'{}' \;
+
+to update copyright ranges.  Run git diff after each tranche of files to
+check the changes, followed by git add.  Look for anomalies (e.g. single
+years) with
+
+  grep '20[0-9][^3] Free' . -R
+
+Can update lone years to ranges with e.g.
+
+  find . -type f \( -name '*.sh' \) -execdir perl -wpli -e 's/( 20\d\d) 
Free/$1-2023 Free/' '{}' \;
+
+
 check at latest automake/autoconf/gettext/help2man version:
   . to upgrade gettext, run
       gettextize -f --po-dir=po --po-dir=po_document



reply via email to

[Prev in Thread] Current Thread [Next in Thread]