#!/usr/bin/perl
# Copyright 2000 Tom Rothamel. No warranty, GPL.

@exempt = qw(
./README
./Makefile.am
./TODO
./aclocal.m4
./configure
./configure.in
./install-sh
./missing
./mkinstalldirs

./ijvma.ruri
./euclid.ruri
./parser_core.h
);

for $i (@exempt) {
	$exempt{$i} = 1;
}


chdir $ARGV[0];

open FIND, "find |";

while (<FIND>) {
	chomp $_;

	next unless -f $_;

	if ($exempt{$_}) {
		next;
	}

	print $_, ': ';
	
	my $line;

	open FILE, "<" . $_;
	while ($line = <FILE>) {
		last if $line =~ /Copyright/i;
	}
	close FILE;

	if ($line =~ /(Copyright.*)$/i) {
		print $1, "\n";
		next;
	}

	print "No copyright.\n";
	exit -1;
}

exit 0;
