X-Git-Url: https://git.saurik.com/apple/icu.git/blobdiff_plain/b75a7d8f3b4adbae880cab104ce2c6a50eee4db2..9d88c94317aeac5dd26c1dbe8c2112dbe855d2b5:/icuSources/tools/cpysearch/cpysearch.pl diff --git a/icuSources/tools/cpysearch/cpysearch.pl b/icuSources/tools/cpysearch/cpysearch.pl index 5ae92c2f..c6405b5f 100644 --- a/icuSources/tools/cpysearch/cpysearch.pl +++ b/icuSources/tools/cpysearch/cpysearch.pl @@ -1,22 +1,25 @@ #!/usr/bin/perl -w -# ******************************************************************** +# *********************************************************************** # * COPYRIGHT: -# * Copyright (c) 2002, International Business Machines Corporation and -# * others. All Rights Reserved. -# ******************************************************************** +# * Copyright (c) 2002-2004, 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 $icuSource = $ARGV[0]; +my $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"; -my $command = "find $icuSource -type f"; -#my $command = "find $icuSource -type f\|grep -v \"$ignore\""; +my ($sec, $min, $hour, , $day, $mon, $year, $wday, $yday, $isdst) = localtime; +$year += 1900; + +my $command = "find $icuSource -type f -mtime -$yday | fgrep -v -f cpyskip.txt"; 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"; + chomp $file; + my @lines = `head -n 20 "$file"`; + if (grep(/copyright.*$year/i, @lines) == 0) { + print "$file\n"; } }