aboutsummaryrefslogtreecommitdiff
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
commitc99882a2857daab32b402a815ab8df4870f7e79e (patch)
tree8ec368109a437c963a6a03e05113a1eefd2c4303
parentefd07bd1364267c7e223d9e8bdcad1a201809ed8 (diff)
downloadpostgresql-c99882a2857daab32b402a815ab8df4870f7e79e.tar.gz
postgresql-c99882a2857daab32b402a815ab8df4870f7e79e.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.
-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 e879209d8c7..6ef6e106323 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/;