[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[no subject]
From: |
Gavin D. Smith |
Date: |
Tue, 15 Aug 2023 05:36:00 -0400 (EDT) |
branch: master
commit 911d5b864c5f953100f549048e8c7aaf5314c8b8
Author: Gavin Smith <gavinsmith0123@gmail.com>
AuthorDate: Tue Aug 15 10:35:40 2023 +0100
* README-hacking: tweak advice on updating copyright years
---
ChangeLog | 4 ++++
README-hacking | 54 +++++++++++++++++++++++++++++++++++++++++-------------
2 files changed, 45 insertions(+), 13 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 7d2b7c2ca7..4457c42063 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2023-08-15 Gavin Smith <gavinsmith0123@gmail.com>
+
+ * README-hacking: tweak advice on updating copyright years
+
2023-08-14 Gavin Smith <gavinsmith0123@gmail.com>
* README-hacking: start of advice on how to update copyright
diff --git a/README-hacking b/README-hacking
index fac9cd566e..51791b26f1 100644
--- a/README-hacking
+++ b/README-hacking
@@ -255,19 +255,47 @@ 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 omissions and anomalies
-(e.g. single years) with
-
- grep '20[0-9][^3] Free' . -R --exclude=Makefile.in --exclude=Makefile
--exclude="*.m4" --exclude=configure --exclude="config.*" --exclude="*~"
--exclude-dir=autom4te.cache
-
-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/' '{}' \;
+simplest just to update them all. First, look for lone copyright years:
+
+find . -type f \
+ \( -name '*' \) \
+ -not -name 'Makefile.in' \
+ -execdir perl -wnl -e '/ 20\d\d Free/ && print "$ARGV:$_"' '{}' \;
+
+Adjust list of files as necessary, adding or excluding names.
+(Note that program help messages should only have a single year.)
+Once you are happy with the list of files, can update lone years to
+ranges with by changing the -execdir argument:
+
+find . -type f \
+ \( -name '*' \) \
+ -not -name 'Makefile.in' \
+ -execdir \ perl -wpli -e 's/( 20\d\d) Free/$1-2023 Free/' '{}' \;
+
+Then use a similar approach to update copyright ranges:
+
+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/' '{}' \;
+
+Run git diff after each tranche of files to check the changes, followed
+by git add. Look for omissions and anomalies by running, e.g.
+
+find . \
+ -name autom4te.cache -prune -o \
+ -name .git -prune -o \
+ -type f \
+ \( -name '*' \) \
+ -not -name 'Makefile.in' \
+ -not -name Makefile \
+ -not -name "*.m4" \
+ -not -name configure \
+ -not -name "config.*" \
+ -not -name "*~" \
+ -exec perl -wnl -e '/ 20\d[^3] Free/ && print "$ARGV:$_"' '{}' \;
+
+at the top level.
check at latest automake/autoconf/gettext/help2man version:
- master updated (1f9a4d2174 -> 911d5b864c), Gavin D. Smith, 2023/08/15
- [no subject], Gavin D. Smith, 2023/08/15
- [no subject], Gavin D. Smith, 2023/08/15
- [no subject], Gavin D. Smith, 2023/08/15
- [no subject],
Gavin D. Smith <=
- [no subject], Gavin D. Smith, 2023/08/15
- [no subject], Gavin D. Smith, 2023/08/15
- [no subject], Gavin D. Smith, 2023/08/15