Skip to content
Snippets Groups Projects
Commit efd07bd1 authored by Bruce Momjian's avatar Bruce Momjian
Browse files

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.
parent 59076b2c
No related branches found
No related tags found
No related merge requests found
...@@ -48,12 +48,10 @@ sub wanted ...@@ -48,12 +48,10 @@ sub wanted
# We only care about lines with a copyright notice. # We only care about lines with a copyright notice.
next unless $line =~ m/$cc.*$pgdg/; next unless $line =~ m/$cc.*$pgdg/;
# We stop when we've done one substitution. This is both for # We process all lines because some files have copyright
# efficiency and, at least in the case of this program, for # strings embedded in them, e.g. src/bin/psql/help.c
# correctness. $line =~ s/($cc\d{4})(, $pgdg)/$1-$year$2/;
last if $line =~ m/$cc.*$year.*$pgdg/; $line =~ s/($cc\d{4})-\d{4}(, $pgdg)/$1-$year$2/;
last if $line =~ s/($cc\d{4})(, $pgdg)/$1-$year$2/;
last if $line =~ s/($cc\d{4})-\d{4}(, $pgdg)/$1-$year$2/;
} }
untie @lines; untie @lines;
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment