equal
deleted
inserted
replaced
23 # Raw inputs come in as parameters to the script |
23 # Raw inputs come in as parameters to the script |
24 # TODO: Use a proper option parsing module |
24 # TODO: Use a proper option parsing module |
25 my $sourcesCSV = shift or die "First arg must be source csv file"; |
25 my $sourcesCSV = shift or die "First arg must be source csv file"; |
26 my $template = shift or die "Second arg must be template file"; |
26 my $template = shift or die "Second arg must be template file"; |
27 my $ftl = shift or die "Third arg must be output file"; |
27 my $ftl = shift or die "Third arg must be output file"; |
28 shift and die "No more than three arguments please"; |
28 my $rndExcludes = shift or die "Fourth arg must be rnd-excludes file"; |
|
29 shift and die "No more than four arguments please"; |
29 |
30 |
30 # Load CSV |
31 # Load CSV |
31 open my $csvText, "<", $sourcesCSV or die; |
32 open my $csvText, "<", $sourcesCSV or die; |
32 my $csv = Text::CSV->new(); |
33 my $csv = Text::CSV->new(); |
33 my @keys; |
34 my @keys; |
139 push @{$zipConfig->{config}->{config}->{bin}->{config}->{set}}, @excludes; |
140 push @{$zipConfig->{config}->{config}->{bin}->{config}->{set}}, @excludes; |
140 |
141 |
141 $xml->XMLout($zipConfig, OutputFile => $ftl, XMLDecl => 1, RootName => 'build', KeyAttr => $keyAttr); |
142 $xml->XMLout($zipConfig, OutputFile => $ftl, XMLDecl => 1, RootName => 'build', KeyAttr => $keyAttr); |
142 |
143 |
143 # Output all rnd files into exclude list for later |
144 # Output all rnd files into exclude list for later |
144 open FILE, "> rnd_excludefile.txt" or die "Cannot write exludefile!"; |
145 open my $fh, ">", $rndExcludes or die "Cannot write exlude file!"; |
145 print FILE @allRndFiles; |
146 print $fh @allRndFiles; |
146 close FILE; |
147 close $fh; |