common/tools/populateziptemplate.pl
changeset 380 d4dac57985d9
parent 372 ea854a4b723d
child 388 2ab990de5a23
--- a/common/tools/populateziptemplate.pl	Mon Aug 24 17:51:03 2009 +0100
+++ b/common/tools/populateziptemplate.pl	Tue Aug 25 11:06:23 2009 +0100
@@ -33,7 +33,7 @@
 }
 
 # Load CSV
-open my $csvText, "<", $sourcesCSV or die;
+open my $csvText, "<", $sourcesCSV or die "Unable to open sources.csv from $sourcesCSV";
 my $csv = Text::CSV->new();
 my @keys;
 my @packages;
@@ -71,6 +71,8 @@
 my $zipConfig = $xml->XMLin($template, keyattr => $keyAttr);
 my @allRndFiles;
 
+my $failures = 0;
+
 # For each package in CSV...
 foreach my $package (@packages)
 {
@@ -140,7 +142,8 @@
 	}
 	else
 	{
-		die "Cannot determine license for '$package->{source}'";
+		warn "Cannot determine license for '$package->{source}'\n";
+		$failures++;
 	}
 }
 
@@ -154,3 +157,5 @@
 open my $fh, ">", $rndExcludes or die "Cannot write exlude file!";
 print $fh @allRndFiles;
 close $fh;
+
+exit($failures);