push(@{$licenses->{$license}->{$license_text}->{$copyright}}, $file);
}
my %refs=();
- my $refnum=0;
+ my $refnum="00";
for my $license (sort keys(%$licenses))
{
for my $license_text (sort keys(%{$licenses->{$license}}))
if(length($license_text))
{
$refnum++;
- $licensestr .= " (REF$refnum)";
+ $licensestr .= " [REF$refnum]";
$refs{$licensestr}=$license_text;
}
for my $copyright (sort keys(%{$licenses->{$license}->{$license_text}}))
}
}
}
- for my $ref (keys(%refs))
+ for my $ref (sort keys(%refs))
{
print COPYRIGHT "License: $ref\n";
my @text=split(/\n/, $refs{$ref});
sub wanted
{
- if(/^\.git/ || /^\.cvs/ || /^debian/)
+ if(/^\.git/ || /^\.cvs/ || /^debian/ || /^modules$/)
{
$File::Find::prune=1;
}
{
print NEW "File: $file\n";
print NEW "Hash: ", $new->{$file}->{hash}, "\n";
- print NEW "License: ", $new->{$file}->{license}, "\n";
print NEW "Copyright: ", $new->{$file}->{copyright}, "\n";
- print NEW "Licence-Text: \n";
+ print NEW "License: ", $new->{$file}->{license}, "\n";
+ print NEW "License_Text: \n";
if($new->{$file}->{license_old})
{
print NEW "#License_old: ", $new->{$file}->{license_old}, "\n";
{
$line++;
chomp;
- next if(/^\s*$/);
next if(/^\s*\#/);
if($in_license_text && /^\s+(.*)/)
{
- $license_text .= "\n" . $1;
+ $license_text .= $1 . "\n";
+ }
+ elsif(/^\s*$/)
+ {
+ next;
}
elsif(/^File:\s*(.*)/)
{
$copyright='';
$hash='';
$license_text='';
+ $in_license_text = 0;
}
elsif(/^Hash:\s*(.*)/)
{
elsif(/^License:\s*(.*)/)
{
$license=$1;
- }
- elsif(/^License_text:\s*(.*)/)
- {
$in_license_text=1;
- $license_text=$1;
- }
- elsif($in_license_text && /^\s+(.*)/)
- {
- $license_text .= "\n" . $1;
+ $license_text='';
}
else
{
- warn("$me: $file: line $line not recognized: $_\n");
+ warn("$me: $NEWFILES: line $line not recognized\n");
}
}
close(NEW);