]> git.saurik.com Git - apple/icu.git/blame - icuSources/tools/cpysearch/cpysearch.pl
ICU-6.2.15.tar.gz
[apple/icu.git] / icuSources / tools / cpysearch / cpysearch.pl
CommitLineData
b75a7d8f 1#!/usr/bin/perl -w
374ca955 2# ***********************************************************************
b75a7d8f 3# * COPYRIGHT:
374ca955
A
4# * Copyright (c) 2002-2004, International Business Machines Corporation
5# * and others. All Rights Reserved.
6# ***********************************************************************
b75a7d8f
A
7use strict;
8
374ca955
A
9my $icuSource = $ARGV[0];
10my $ignore = "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";
b75a7d8f 11
374ca955
A
12my ($sec, $min, $hour, , $day, $mon, $year, $wday, $yday, $isdst) = localtime;
13$year += 1900;
14
15my $command = "find $icuSource -type f -mtime -$yday | fgrep -v -f cpyskip.txt";
b75a7d8f
A
16my @files = `$command`;
17@files = grep(!/$ignore/, @files);
18my $file;
19foreach $file (@files) {
374ca955
A
20 chomp $file;
21 my @lines = `head -n 20 "$file"`;
22 if (grep(/copyright.*$year/i, @lines) == 0) {
23 print "$file\n";
b75a7d8f
A
24 }
25}