diff options
Diffstat (limited to 'tools/build/module-install.pl')
-rw-r--r-- | tools/build/module-install.pl | 36 |
1 files changed, 26 insertions, 10 deletions
diff --git a/tools/build/module-install.pl b/tools/build/module-install.pl index 9f7e038..eadb99e 100644 --- a/tools/build/module-install.pl +++ b/tools/build/module-install.pl @@ -2,21 +2,37 @@ use warnings; use strict; + my $perl6bin = shift @ARGV; my $zefbin = shift @ARGV; +my $exit = 0; +my $path_sep = $^O eq 'MSWin32' ? '\\' : '/'; -my $exit = 0; +while (<>) { + # Skip comments + next if /^\s*(#|$)/; -my $path_sep = "/"; -$path_sep = "\\" if ( $^O eq 'MSWin32' ); + # Extract only the module name from the current line + my ($module) = /(\S+)/; -while (<>) { - next if /^\s*(#|$)/; - my ($module) = /(\S+)/; - $exit ||= system $perl6bin, $zefbin, - '--/build-depends', '--/test-depends', '--/depends', - '--/p6c', '--/metacpan', '--/cpan', - '--force', 'install', "./modules$path_sep$module"; + # Create the command list + my @cmd = ( + $perl6bin, + $zefbin, + '--/build-depends', + '--/depends', + '--/test', + '--/test-depends', + '--force', + 'install', + "./modules$path_sep$module" + ); + + # Show the command that's going to be ran, for debugging purposes + printf "@cmd\n"; + + # Actually run the command + $exit ||= system "@cmd"; } exit $exit; |