common/tools/populateziptemplate.pl
changeset 90 5b27412eeaf0
parent 89 a8aa5d600806
child 94 5e9bdb9269c7
equal deleted inserted replaced
89:a8aa5d600806 90:5b27412eeaf0
    76 	}
    76 	}
    77 	elsif ($package->{source} =~ m{/rnd/([^/]+)/([^/]+)})
    77 	elsif ($package->{source} =~ m{/rnd/([^/]+)/([^/]+)})
    78 	{
    78 	{
    79 		# RnD repository
    79 		# RnD repository
    80 		my $name = "bin_rnd_$1_$2";
    80 		my $name = "bin_rnd_$1_$2";
    81 		# Enumerate all the files on the local disk that are in this repository
       
    82 		(my $dosCompatibleDst = $package->{dst}) =~ s{/}{\\}g;
       
    83 		my @files = `dir /b/s/a-d $dosCompatibleDst 2> nul:`;
       
    84 		#print "@files\n";
       
    85 		next unless @files;
       
    86 		# Add the files to this zip object
       
    87 		@files = grep {
       
    88 			chomp;
       
    89 			s{\\}{/}g;
       
    90 			s!^[A-Z]:/$package->{dst}/!!i;
       
    91 			m{^epoc32/}i;
       
    92 		} @files;
       
    93 		#print "@files\n";
       
    94 		push @allRndFiles, @files;
       
    95 		# Create a zip object
    81 		# Create a zip object
    96 		my @includes = map { {name => "include", value => "$_"} } @files;
       
    97 		push @{$zipConfig->{config}->{config}->{src}->{config}->{rnd}->{config}},
    82 		push @{$zipConfig->{config}->{config}->{src}->{config}->{rnd}->{config}},
    98 		{
    83 		{
    99 			set =>
    84 			set =>
   100 			[
    85 			[
   101 				{
    86 				{
   110 					name => "include",
    95 					name => "include",
   111 					value=> "/**",
    96 					value=> "/**",
   112 				},
    97 				},
   113 			]
    98 			]
   114 		};
    99 		};
       
   100 		# Enumerate all the files on the local disk that are in this repository
       
   101 		(my $dosCompatibleDst = $package->{dst}) =~ s{/}{\\}g;
       
   102 		my @files = `dir /b/s/a-d $dosCompatibleDst 2> nul:`;
       
   103 		#print "@files\n";
       
   104 		next unless @files;
       
   105 		# Add the files to this zip object
       
   106 		@files = grep {
       
   107 			chomp;
       
   108 			s{\\}{/}g;
       
   109 			s!^[A-Z]:/$package->{dst}/!!i;
       
   110 			m{^epoc32/}i;
       
   111 		} @files;
       
   112 		push @allRndFiles, @files;
   115 	}
   113 	}
   116 	else
   114 	else
   117 	{
   115 	{
   118 		die "Cannot determine license for '$package->{source}'";
   116 		die "Cannot determine license for '$package->{source}'";
   119 	}
   117 	}