[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[no subject]
From: |
Gavin D. Smith |
Date: |
Thu, 8 Feb 2024 15:48:17 -0500 (EST) |
branch: master
commit 22d274b8706f509b1121720076b7c41cce351d62
Author: Gavin Smith <gavinsmith0123@gmail.com>
AuthorDate: Thu Feb 8 20:46:39 2024 +0000
* README-hacking: update instructions on updating copyright
years.
---
ChangeLog | 7 ++++++-
README-hacking | 42 ++++++++++++------------------------------
2 files changed, 18 insertions(+), 31 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 7e72bfa10f..94f9a01e38 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2024-02-08 Gavin Smith <gavinsmith0123@gmail.com>
+
+ * README-hacking: update instructions on updating copyright
+ years.
+
2024-02-08 Gavin Smith <gavinsmith0123@gmail.com>
Copyright years updating script
@@ -25542,7 +25547,7 @@
* README-hacking: new ChangeLog file done
-Copyright 2022-2023 Free Software Foundation, Inc.
+Copyright 2022-2024 Free Software Foundation, Inc.
Copying and distribution of this file, with or without modification,
are permitted in any medium without royalty provided the copyright
diff --git a/README-hacking b/README-hacking
index 120bace8a5..22a600f9b9 100644
--- a/README-hacking
+++ b/README-hacking
@@ -1,4 +1,4 @@
- Copyright 2002-2023 Free Software Foundation, Inc.
+ Copyright 2002-2024 Free Software Foundation, Inc.
Copying and distribution of this file, with or without modification,
are permitted in any medium without royalty provided the copyright
@@ -208,39 +208,22 @@ program. All the usual Texinfo output formats are
possible.
- Updating copyright years in files
-It may be simplest just to update them all at once. First, look for
-lone copyright years:
+We try to handle updating years in copyright notices automatically to
+relive people of the burden of remembering to update copyright years when
+they edit a file for the first time in a new year.
-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:
+In a new year, run "./grand-replace.sh ." from the top level.
+Check changes with "git diff" before committing.
-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.
+Look for omissions by running, e.g.
find . \
-name autom4te.cache -prune -o \
-name .git -prune -o \
-wholename ./tp/maintain/lib -prune -o \
-name test -prune -o \
+ -name "test-infodir" -prune -o \
+ -name "gnulib" -prune -o \
-type f \
\( -name '*' \) \
-not -name 'Makefile.in' \
@@ -249,11 +232,10 @@ find . \
-not -name configure \
-not -name "config.*" \
-not -name "*~" \
- -exec perl -wnl -e '/20\d[^3] Free/ && print "$ARGV:$_"' '{}' \;
-
-at the top level.
+ -exec perl -wnl -e '/20\d[^4] Free/ && print "$ARGV:$_"' '{}' \;
-(We should automate this process in the future.)
+at the top level. It's likely that the script doesn't find all the
+years that should be updated yet.