#
# Generate report on copyright files
#
# CDDL HEADER START
#
# The contents of this file are subject to the terms of the
# Common Development and Distribution License, Version 1.0 only
# (the "License"). You may not use this file except in compliance
# with the License.
#
# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
# See the License for the specific language governing permissions
# and limitations under the License.
#
# When distributing Covered Code, include this CDDL HEADER in each
# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
# If applicable, add the following below this CDDL HEADER, with the
# fields enclosed by brackets "[]" replaced with your own identifying
# information: Portions Copyright [yyyy] [name of copyright owner]
#
# CDDL HEADER END
#
#
# Copyright 2008 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
#
use strict;
use warnings;
use Cwd;
print "report-copyright [options] <spec files...>\n";
print "\n";
print "Options:\n";
print " -b s, --branch=s\n";
print " Use the s branch for links to copyright files, instead\n";
print " of trunk\n";
print " -r r, --repo=r\n";
print " Use the r repository for links to copyright files,\n";
print " instead of spec-files\n";
print " -h, --help\n";
print " Print this usage information\n";
}
my @specs;
my $repo = "spec-files";
my $branch = "trunk";
my $arg = shift;
print "Try --help for usage.\n";
exit (1);
}
}
}
my %owners;
my %copyright_files;
# like uniq(1)
my @list = @_;
my $prev;
return @list;
}
}
return @uniq_list;
}
# find the owner from the comments
}
$owner =~ s/^#\s*[Oo]wner:\s*(\S+)\s*/$1/;
# find the copyright file
}
print << "_EOF";
<html>
<head>
</head>
<body>
<table border=1 cellspacing=0>
my $missing = 0;
print "<td><a href=\"http://www.opensolaris.org/viewProfile.jspa?username=$owners{$spec}\">$owners{$spec}</a></td>\n";
$missing ++;
} else {
print "<td bgcolor=#aaffaa><a href=\"http://src.opensolaris.org/source/xref/jds/${repo}/${branch}/copyright/${copyright_files{$spec}}\">$copyright_files{$spec}</a></td>\n";
}
print "</tr>\n";
}
print << "_EOF";
</table><p>
<p>
<table border=1 cellspacing=0>
my $first_spec = 1;
print "<tr><td valign=top><a href=\"http://www.opensolaris.org/viewProfile.jspa?username=$owners{$spec}\">$owners{$spec}</a></td>\n";
$first_spec = 0;
print "<td>\n";
}
}
}
print "</td></tr>\n";
}
}
print << "_EOF";
</table>
</font>
</body>
</html>
}
main();