]> git.saurik.com Git - apple/icu.git/blame - icuSources/tools/cpysearch/cpyscan.pl
ICU-8.11.1.tar.gz
[apple/icu.git] / icuSources / tools / cpysearch / cpyscan.pl
CommitLineData
374ca955
A
1#!/usr/bin/perl -w
2# ***********************************************************************
3# * COPYRIGHT:
73c04bcf 4# * Copyright (c) 2002-2005, International Business Machines Corporation
374ca955
A
5# * and others. All Rights Reserved.
6# ***********************************************************************
73c04bcf
A
7#
8# Search for and list files which don't have a copyright notice, and should.
9#
374ca955
A
10use strict;
11
12my $icuSource = $ARGV[0];
13my $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";
14
15my $command = "find $icuSource -type f | fgrep -v -f cpyskip.txt";
16my @files = `$command`;
17@files = grep(!/$ignore/, @files);
18my $file;
19foreach $file (@files) {
20 chomp $file;
21 my @lines = `head -n 20 "$file"`;
22 if (grep(/copyright.*(international|ibm)/i, @lines) == 0) {
23 print "$file\n";
24 }
25}