aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBruce Momjian <bruce@momjian.us>2012-07-06 12:21:43 -0400
committerBruce Momjian <bruce@momjian.us>2012-07-06 12:21:43 -0400
commitd17c0135cdf6e478a29080f563da3d65cb441291 (patch)
treeea47167729081d3f2021449e0e0e3e8b94a1f678 /src
parent95203e0833664a1cb221e4f3ad766d167db893b8 (diff)
downloadpostgresql-d17c0135cdf6e478a29080f563da3d65cb441291.tar.gz
postgresql-d17c0135cdf6e478a29080f563da3d65cb441291.zip
Have copyright.pl skip updating something that is just the current year,
to avoid producing dups, e.g. 2012-2012 Backpatch to 9.2.
Diffstat (limited to 'src')
-rwxr-xr-xsrc/tools/copyright.pl4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/tools/copyright.pl b/src/tools/copyright.pl
index 5911586b8e4..52a7cb16cc6 100755
--- a/src/tools/copyright.pl
+++ b/src/tools/copyright.pl
@@ -48,6 +48,10 @@ sub wanted
# We only care about lines with a copyright notice.
next unless $line =~ m/$cc.*$pgdg/;
+ # Skip line if already matches the current year; if not
+ # we get $year-$year, e.g. 2012-2012
+ next if $line =~ m/$cc$year, $pgdg/;
+
# 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/;