aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBruce Momjian <bruce@momjian.us>2012-07-06 11:58:55 -0400
committerBruce Momjian <bruce@momjian.us>2012-07-06 11:58:55 -0400
commitefd07bd1364267c7e223d9e8bdcad1a201809ed8 (patch)
treede67322966df72c75849f19a031b7f32e3f9de61 /src
parent59076b2c7651c1c5f2f61d4af0e33403ccacf1df (diff)
downloadpostgresql-efd07bd1364267c7e223d9e8bdcad1a201809ed8.tar.gz
postgresql-efd07bd1364267c7e223d9e8bdcad1a201809ed8.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.
Diffstat (limited to 'src')
-rwxr-xr-xsrc/tools/copyright.pl10
1 files changed, 4 insertions, 6 deletions
diff --git a/src/tools/copyright.pl b/src/tools/copyright.pl
index 567c041cc58..e879209d8c7 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;
}