11 # check command line arguments
12 if (@ARGV < 2 || ($ARGV[0] =~ /^[-\/]/) || !($ARGV[0] =~ /tre
$/i
))
14 die "usage: $0 [treefile.tre] [changelist ...]\n";
19 # process all changelists gathering up files for the TRE
20 print "Processing changelists\n";
22 foreach my $changelist (sort numerically
@ARGV)
24 print "\t$changelist\n";
25 open(P4
, "p4 describe -s $changelist |");
29 if (s
%^\
.\
.\
. //depot
/swg/live
/(data/sku
.\d
+/sys.(client|shared)/[^\
/]+/[^\
/]+)/%%)
33 $file{$_} = "../../$prefix/" . $_;
41 # generate the tree file response file
42 print "Generating response file\n";
45 open(RSP
, ">" . $rsp);
46 foreach (sort keys %file)
48 print "\t", $_, " @ ", $file{$_}, "\n";
49 print RSP
$_, " @ ", $file{$_}, "\n";
55 print "Generating tree file\n";
56 open(TRE
, "TreeFileBuilder -r $rsp $tre |");
57 print "\t", $_ while (<TRE
>);
61 # generate the md5sum for the file
62 print "Generating md5sum\n";
65 system("md5sum -b $tre > $md5");
67 print "\t", $_ while (<MD5
>);