ICU-2107 tool for finding files without copyright notice
X-SVN-Rev: 10724
This commit is contained in:
parent
c174445ce7
commit
4b6983d1fe
22
icu4c/source/tools/cpysearch/cpysearch.pl
Executable file
22
icu4c/source/tools/cpysearch/cpysearch.pl
Executable file
@ -0,0 +1,22 @@
|
||||
#!/usr/bin/perl -w
|
||||
# ********************************************************************
|
||||
# * COPYRIGHT:
|
||||
# * Copyright (c) 2002, International Business Machines Corporation and
|
||||
# * others. All Rights Reserved.
|
||||
# ********************************************************************
|
||||
use strict;
|
||||
|
||||
my $icuSource = "/icu/source";
|
||||
my $ignore = "CVS|\\~|\\#|Debug|Release|dsp|dsw|opt|ncb|cvsignore|cnv|res|\\.icu|exe|out|build|plg|positions|unidata";
|
||||
|
||||
my $command = "find $icuSource -type f";
|
||||
#my $command = "find $icuSource -type f\|grep -v \"$ignore\"";
|
||||
my @files = `$command`;
|
||||
@files = grep(!/$ignore/, @files);
|
||||
my $file;
|
||||
foreach $file (@files) {
|
||||
my @lines = `head -n 10 $file`;
|
||||
if (grep(/copyright/i, @lines) == 0) {
|
||||
print "$file";
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user