[sword-cvs] icu-sword/source/tools/cpysearch cpysearch.pl,1.1,1.2

sword@www.crosswire.org sword@www.crosswire.org
Tue, 6 Apr 2004 03:11:00 -0700


Update of /cvs/core/icu-sword/source/tools/cpysearch
In directory www:/tmp/cvs-serv8911/source/tools/cpysearch

Modified Files:
	cpysearch.pl 
Log Message:
ICU 2.8 sync

Index: cpysearch.pl
===================================================================
RCS file: /cvs/core/icu-sword/source/tools/cpysearch/cpysearch.pl,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- cpysearch.pl	10 Sep 2003 02:42:55 -0000	1.1
+++ cpysearch.pl	6 Apr 2004 10:09:57 -0000	1.2
@@ -1,22 +1,24 @@
 #!/usr/bin/perl -w
 #  ********************************************************************
 #  * COPYRIGHT:
-#  * Copyright (c) 2002, International Business Machines Corporation and
+#  * Copyright (c) 2002-2003, 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|\\.dsp|\\.dsw|\\.opt|\\.ncb|\\.vcproj|\\.sln|\\.suo|\\.cvsignore|\\.cnv|\\.res|\\.icu|\\.exe|\\.out|build|\\.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";
 my @files = `$command`;
 @files = grep(!/$ignore/, @files);
 my $file;
 foreach $file (@files) {
   my @lines = `head -n 10 $file`;
-  if (grep(/copyright/i, @lines) == 0) {
+  if (grep(/copyright.*$year/i, @lines) == 0) {
     print "$file";
   }
 }