Commit d17c0135 authored by Bruce Momjian's avatar Bruce Momjian

Have copyright.pl skip updating something that is just the current year,

to avoid producing dups, e.g. 2012-2012

Backpatch to 9.2.
parent 95203e08
...@@ -48,6 +48,10 @@ sub wanted ...@@ -48,6 +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/;
# 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 # We process all lines because some files have copyright
# strings embedded in them, e.g. src/bin/psql/help.c # 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})(, $pgdg)/$1-$year$2/;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment