2004-08-10 17:57:01 +00:00
|
|
|
#!/usr/bin/perl -w
|
2004-11-04 22:56:36 +00:00
|
|
|
# ***********************************************************************
|
2004-08-10 17:57:01 +00:00
|
|
|
# * COPYRIGHT:
|
2005-06-07 23:38:09 +00:00
|
|
|
# * Copyright (c) 2002-2005, International Business Machines Corporation
|
2004-11-04 22:56:36 +00:00
|
|
|
# * and others. All Rights Reserved.
|
|
|
|
# ***********************************************************************
|
2005-04-25 23:47:25 +00:00
|
|
|
#
|
|
|
|
# Search for and list files which don't have a copyright notice, and should.
|
|
|
|
#
|
2004-08-10 17:57:01 +00:00
|
|
|
use strict;
|
|
|
|
|
|
|
|
my $icuSource = $ARGV[0];
|
2004-11-04 22:56:36 +00:00
|
|
|
my $ignore = "data/out/build|CVS|\\~|\\#|Debug|Release|\\.dll|\\.ilk|\\.idb|\\.pdb|\\.dsp|\\.dsw|\\.opt|\\.ncb|\\.vcproj|\\.sln|\\.suo|\\.cvsignore|\\.cnv|\\.res|\\.icu|\\.exe|\\.obj|\\.bin|\\.exp|\\.lib|\\.out|\\.plg|positions|unidata|\\.jar|\\.spp|\\.stub|\\.policy";
|
2004-08-10 17:57:01 +00:00
|
|
|
|
2004-11-04 22:56:36 +00:00
|
|
|
my $command = "find $icuSource -type f | fgrep -v -f cpyskip.txt";
|
2004-08-10 17:57:01 +00:00
|
|
|
my @files = `$command`;
|
|
|
|
@files = grep(!/$ignore/, @files);
|
|
|
|
my $file;
|
|
|
|
foreach $file (@files) {
|
|
|
|
chomp $file;
|
2004-11-01 23:36:49 +00:00
|
|
|
my @lines = `head -n 20 "$file"`;
|
2004-08-10 17:57:01 +00:00
|
|
|
if (grep(/copyright.*(international|ibm)/i, @lines) == 0) {
|
|
|
|
print "$file\n";
|
|
|
|
}
|
|
|
|
}
|