mirror of
https://git.postgresql.org/git/postgresql.git
synced 2025-01-06 15:24:56 +08:00
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.
This commit is contained in:
parent
5198ae8992
commit
95203e0833
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user