[sword-cvs] icu-sword/source/tools/cpysearch cpysearch.pl,NONE,1.1 readme.txt,NONE,1.1

sword@www.crosswire.org sword@www.crosswire.org
Tue, 9 Sep 2003 19:42:57 -0700


Update of /usr/local/cvsroot/icu-sword/source/tools/cpysearch
In directory www:/tmp/cvs-serv19862/source/tools/cpysearch

Added Files:
	cpysearch.pl readme.txt 
Log Message:
ICU 2.6 commit

--- NEW FILE: cpysearch.pl ---
#!/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";
  }
}

--- NEW FILE: readme.txt ---
Copyright (c) 2002, International Business Machines Corporation and others. All Rights Reserved.


cpysearch.pl is a perl script used to detect the files that might not have the copyright notice. Best when used on windows on a clean checkout. Edit $icuSource to your path. If you are working on other platform, you probably want to edit $ignore to reflect different temporary files that you don't want in the scan. The result will be the list of files that don't have word copyright (case ignored) in first 10 lines. Look at them and fix if needed. 

Have fun!
weiv