common/tools/populateziptemplate.pl
changeset 408 0c558d696e7a
parent 313 52d855dfda13
child 372 ea854a4b723d
--- a/common/tools/populateziptemplate.pl	Tue Aug 18 13:48:35 2009 +0100
+++ b/common/tools/populateziptemplate.pl	Mon Aug 24 11:01:37 2009 +0100
@@ -26,7 +26,11 @@
 my $template = shift or die "Second arg must be template file";
 my $ftl = shift or die "Third arg must be output file";
 my $rndExcludes = shift or die "Fourth arg must be rnd-excludes file";
-shift and die "No more than four arguments please";
+my $nosource = shift;
+if(defined $nosource && $nosource !~ m/--nosource/i)
+{
+  die "fifth argument can only be \'--nosource\'";
+}
 
 # Load CSV
 open my $csvText, "<", $sourcesCSV or die;
@@ -73,21 +77,24 @@
 	warn "Warning: Package $package->{dst} does not appear on the local system\n" unless -d $package->{dst};
 	$package->{dst} =~ s{^/}{}g;
 	if ($package->{source} =~ m{/(sfl|oss)/(MCL|FCL)/sf/([^/]+)/([^/]+)})
-	{	    
-		push @{$zipConfig->{config}->{config}->{src}->{config}->{$1}->{config}},
-		{
-			set =>
-			[
-				{
-					name => "name",
-					value=> "src_$1_$3_$4",
-				},
-				{
-					name => "include",
-					value => "$package->{dst}/**",
-				},
-			]
-		};
+	{
+		if(!defined $nosource)
+  	{
+  		push @{$zipConfig->{config}->{config}->{src}->{config}->{$1}->{config}},
+  		{
+  			set =>
+  			[
+  				{
+  					name => "name",
+  					value=> "src_$1_$3_$4",
+  				},
+  				{
+  					name => "include",
+  					value => "$package->{dst}/**",
+  				},
+  			]
+  		};
+  	}	
 	}
 	elsif ($package->{source} =~ m{/rnd/([^/]+)/([^/]+)})
 	{