diff options
author | Bruce Momjian <bruce@momjian.us> | 2012-07-06 11:58:55 -0400 |
---|---|---|
committer | Bruce Momjian <bruce@momjian.us> | 2012-07-06 11:58:55 -0400 |
commit | 95203e0833664a1cb221e4f3ad766d167db893b8 (patch) | |
tree | 9767a0c382e59a5ab85b05d6438a0b1aef783f26 | |
parent | 5198ae89924db730d7d3ec3ab7b14c17a22c7f82 (diff) | |
download | postgresql-95203e0833664a1cb221e4f3ad766d167db893b8.tar.gz postgresql-95203e0833664a1cb221e4f3ad766d167db893b8.zip |
Modify copyright.pl so all lines are processed, not just the first
match, so files that contain embedded copyrights are updated, e.g.
pgsql/help.c.
Backpatch to 9.2.
-rwxr-xr-x | src/tools/copyright.pl | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/src/tools/copyright.pl b/src/tools/copyright.pl index c78f20e119e..5911586b8e4 100755 --- a/src/tools/copyright.pl +++ b/src/tools/copyright.pl @@ -48,12 +48,10 @@ sub wanted # We only care about lines with a copyright notice. next unless $line =~ m/$cc.*$pgdg/; - # We stop when we've done one substitution. This is both for - # efficiency and, at least in the case of this program, for - # correctness. - last if $line =~ m/$cc.*$year.*$pgdg/; - last if $line =~ s/($cc\d{4})(, $pgdg)/$1-$year$2/; - last if $line =~ s/($cc\d{4})-\d{4}(, $pgdg)/$1-$year$2/; + # We process all lines because some files have copyright + # strings embedded in them, e.g. src/bin/psql/help.c + $line =~ s/($cc\d{4})(, $pgdg)/$1-$year$2/; + $line =~ s/($cc\d{4})-\d{4}(, $pgdg)/$1-$year$2/; } untie @lines; } |