1
0
mirror of https://github.com/bitcoin/bips.git synced 2025-05-12 12:03:29 +00:00

scripts/buildtable: Support License-Code header

This commit is contained in:
Luke Dashjr 2017-10-29 04:04:07 +00:00
parent 21da438ad5
commit 41cabd2de5

View File

@ -19,6 +19,7 @@ my %MayHaveMulti = (
Author => undef, Author => undef,
'Comments-URI' => undef, 'Comments-URI' => undef,
License => undef, License => undef,
'License-Code' => undef,
'Post-History' => undef, 'Post-History' => undef,
); );
my %DateField = ( my %DateField = (
@ -149,9 +150,9 @@ while (++$bipnum <= $topbip) {
} elsif ($field eq 'Layer') { # BIP 123 } elsif ($field eq 'Layer') { # BIP 123
die "Invalid layer $val in $fn" unless exists $ValidLayer{$val}; die "Invalid layer $val in $fn" unless exists $ValidLayer{$val};
$layer = $val; $layer = $val;
} elsif ($field eq 'License') { } elsif ($field =~ /^License(?:\-Code)?$/) {
die "Undefined license $val in $fn" unless exists $DefinedLicenses{$val}; die "Undefined license $val in $fn" unless exists $DefinedLicenses{$val};
if (not $found{License}) { if (not $found{$field}) {
die "Unacceptable license $val in $fn" unless exists $AcceptableLicenses{$val} or ($val eq 'PD' and exists $GrandfatheredPD{$bipnum}); die "Unacceptable license $val in $fn" unless exists $AcceptableLicenses{$val} or ($val eq 'PD' and exists $GrandfatheredPD{$bipnum});
} }
} elsif ($field eq 'Comments-URI') { } elsif ($field eq 'Comments-URI') {