/usr/share/deal.II/scripts/copyright.pl is in libdeal.ii-dev 6.3.1-1.1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 | ######################################################################
# $Id: copyright.pl 10291 2005-03-29 16:27:05Z guido $
#
# Copyright
#
######################################################################
# Check the copyright line of a file against cvs log
#
# Call: perl copyright.pl <filename>
######################################################################
use strict;
my $file = $ARGV[0];
my @log = `cvs log $file`;
my %years;
foreach (@log)
{
next unless (m/^date: (\d\d\d\d)/);
my $year = $1;
$years{$year} = 1;
}
my $copystring;
foreach (sort keys %years)
{
if ($copystring)
{
$copystring .= ", $_";
} else {
$copystring = "$_";
}
}
my $copyreg = "Copyright \\(C\\) $copystring by the deal.II authors";
$copystring = "Copyright (C) $copystring by the deal.II authors";
my $found = 0;
my $qpl = 0;
my $ok = 0;
while(<>)
{
next unless (m/(Copyright.*authors)/);
my $copyfile = $1;
$found = 1;
if (m/$copyreg/)
{
$ok = 1;
} else {
$copyfile =~ s/\(/\\(/;
$copyfile =~ s/\)/\\)/;
print "perl -pi~ -e 's{$copyfile}{$copystring};' $file\n";
}
}
# print "# OK: $copystring\n" if ($ok);
print "# $file: no copyright found\n" unless ($found);
|