Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 5.3

...

$root=When you have your Sakai source code
$target=Where you want your condensed tree
$filter=The directory pattern to search for

Code Block
borderStylesolid
titleExample source code condenserborderStylesolid
#!/usr/bin/perl
use File::Copy;
use File::Find;

my $root="/home/alan/temp/coverage/src/trunk";
my $target="/home/alan/temp/coverage/src/condensed_trunk";
my $filter="src/java/";
my @parts;

print "Copying and condensing source ready for htmlzing\n";
mkdir("$target", 0755) || die "Cannot mkdir $target: $!";
find (\&wanted, $root);

sub wanted{
    @parts=split(/$filter/,$File::Find::name);
    if ((-d $_)&&($parts[1] ne "")){
        if (!(-d "$target/$parts[1]" )){
             mkdir("$target/$parts[1]", 0755) || die "Cannot mkdir $target/$parts[1]: $!";
        }
    }else{
        if ($_=~/.java$/){
             copy($File::Find::name,"$target/$parts[1]");
        }
    }
}

...

{$JAVA_HOME}/bin/java emma

Code Block
borderStylesolid
titleResulting outputborderStylesolid
emma usage: emma <command> command options,
  where <command> is one of:

   run     application runner same as 'emmarun' tool;
   instr   offline instrumentation processor;
   ctl     remote control processor;

   merge   offline data file merge processor.
   report  offline report generator;

  use '<command> -h' to see usage help for a given command

EMMA v2.1, build 5320 (stable)

...