[master] fix update_copyrights to deal with python modules correctly
This commit is contained in:
@@ -369,25 +369,25 @@
|
||||
./bin/python/dnssec-checkds.8 MAN DOCBOOK
|
||||
./bin/python/dnssec-checkds.docbook SGML 2012,2013,2014,2015
|
||||
./bin/python/dnssec-checkds.html HTML DOCBOOK
|
||||
./bin/python/dnssec-checkds.py.in PYTHON 2012,2013,2014,2015,2016
|
||||
./bin/python/dnssec-checkds.py.in PYTHON-BIN 2012,2013,2014,2015,2016
|
||||
./bin/python/dnssec-coverage.8 MAN DOCBOOK
|
||||
./bin/python/dnssec-coverage.docbook SGML 2013,2014,2015,2016
|
||||
./bin/python/dnssec-coverage.html HTML DOCBOOK
|
||||
./bin/python/dnssec-coverage.py.in PYTHON 2013,2014,2015,2016
|
||||
./bin/python/dnssec-coverage.py.in PYTHON-BIN 2013,2014,2015,2016
|
||||
./bin/python/dnssec-keymgr.docbook SGML 2016
|
||||
./bin/python/dnssec-keymgr.py.in PYTHON 2016
|
||||
./bin/python/dnssec-keymgr.py.in PYTHON-BIN 2016
|
||||
./bin/python/isc/.gitignore X 2016
|
||||
./bin/python/isc/Makefile.in MAKE 2016
|
||||
./bin/python/isc/__init__.py PYTHON 2016
|
||||
./bin/python/isc/checkds.py PYTHON 2016
|
||||
./bin/python/isc/coverage.py PYTHON 2016
|
||||
./bin/python/isc/dnskey.py PYTHON 2016
|
||||
./bin/python/isc/eventlist.py PYTHON 2016
|
||||
./bin/python/isc/checkds.py PYTHON 2012,2013,2014,2015,2016
|
||||
./bin/python/isc/coverage.py PYTHON 2013,2014,2015,2016
|
||||
./bin/python/isc/dnskey.py PYTHON 2013,2014,2015,2016
|
||||
./bin/python/isc/eventlist.py PYTHON 2015,2016
|
||||
./bin/python/isc/keydict.py PYTHON 2016
|
||||
./bin/python/isc/keyevent.py PYTHON 2016
|
||||
./bin/python/isc/keyevent.py PYTHON 2013,2014,2015,2016
|
||||
./bin/python/isc/keymgr.py PYTHON 2016
|
||||
./bin/python/isc/keyseries.py PYTHON 2016
|
||||
./bin/python/isc/keyzone.py PYTHON 2016
|
||||
./bin/python/isc/keyzone.py PYTHON 2013,2014,2015,2016
|
||||
./bin/python/isc/policy.py PYTHON 2016
|
||||
./bin/python/isc/tests/Makefile.in MAKE 2016
|
||||
./bin/python/isc/tests/dnskey_test.py PYTHON 2016
|
||||
|
||||
@@ -182,6 +182,7 @@ foreach $file (keys %file_types) {
|
||||
$zone_comment = 0;
|
||||
$man_comment = 0;
|
||||
$python_comment = 0;
|
||||
$python_bin_comment = 0;
|
||||
$start_comment = "";
|
||||
$end_comment = "";
|
||||
$first = "";
|
||||
@@ -193,6 +194,11 @@ foreach $file (keys %file_types) {
|
||||
} elsif ($type =~ /^(SH|PERL|TCL|MAKE|CONF-SH|RNC)$/) {
|
||||
$shell_comment = 1;
|
||||
$prefix = "# ";
|
||||
} elsif ($type =~ /^PYTHON-BIN$/) {
|
||||
$python_bin_comment = 1;
|
||||
$start_comment = "############################################################################\n";
|
||||
$prefix = "# ";
|
||||
$end_comment = "############################################################################\n"
|
||||
} elsif ($type =~ /^PYTHON$/) {
|
||||
$python_comment = 1;
|
||||
$start_comment = "############################################################################\n";
|
||||
@@ -271,12 +277,15 @@ foreach $file (keys %file_types) {
|
||||
} else {
|
||||
$first = $_;
|
||||
}
|
||||
} elsif ($python_comment) {
|
||||
if (/^\#\!/) {
|
||||
} elsif ($python_comment || $python_bin_comment) {
|
||||
if ($python_bin_comment && /^\#\!/) {
|
||||
$before_copyright = "$_";
|
||||
$_ = <SOURCE>;
|
||||
$_ = <SOURCE> if $_ eq "#\n";
|
||||
$_ = <SOURCE> if $_ eq "############################################################################\n";
|
||||
} elsif ($python_comment && /^\#/) {
|
||||
$_ = <SOURCE> if $_ eq "#\n";
|
||||
$_ = <SOURCE> if $_ eq "############################################################################\n";
|
||||
}
|
||||
if (/^\#/) {
|
||||
if ($_ !~ /[Cc]opyright/) {
|
||||
@@ -593,7 +602,7 @@ foreach $file (keys %file_types) {
|
||||
}
|
||||
|
||||
my ($start, $end);
|
||||
if ($type =~ /^PYTHON$/) {
|
||||
if ($type =~ /^PYTHON(|-BIN)$/) {
|
||||
($start = $prefix) =~ s/\s*\n//;
|
||||
$end = "\n";
|
||||
} elsif ($start_comment ne "") {
|
||||
|
||||
Reference in New Issue
Block a user