Last active
December 2, 2016 04:42
-
-
Save ugexe/aaa74c735e585f12f76d6efe0daec848 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! perl | |
use warnings; | |
use strict; | |
my $perl6bin = shift @ARGV; | |
my $zefbin = shift @ARGV; | |
my $exit = 0; | |
my $path_sep = "/"; | |
$path_sep = "\\" if ( $^O eq 'MSWin32' ); | |
my @module_paths; | |
while (<>) { | |
next if /^\s*(#|$)/; | |
my ($module) = /(\S+)/; | |
push @module_paths, "./modules$path_sep$module"; | |
} | |
exit system $perl6bin, $zefbin, | |
'--/build-depends', '--/test-depends', '--/depends', | |
'--/p6c', '--/metacpan', '--/cpan', | |
'install', @module_paths; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! perl | |
use warnings; | |
use strict; | |
my $perl6bin = shift @ARGV; | |
my $zefbin = shift @ARGV; | |
my $exit = 0; | |
my $path_sep = "/"; | |
$path_sep = "\\" if ( $^O eq 'MSWin32' ); | |
my @module_paths; | |
while (<>) { | |
next if /^\s*(#|$)/; | |
my ($module) = /(\S+)/; | |
push @module_paths, "./modules$path_sep$module"; | |
} | |
# Alternatively test first without --force... | |
exit 255 if system $perl6bin, $zefbin, | |
'--/build-depends', '--/test-depends', '--/depends', | |
'--/p6c', '--/metacpan', '--/cpan', | |
'test', @module_paths; | |
# ... and install with --force if the tests passed | |
# (and skip testing again) | |
exit system $perl6bin, $zefbin, | |
'--/build-depends', '--/test-depends', '--/depends', | |
'--/p6c', '--/metacpan', '--/cpan', | |
'--force', '--/test', install', @module_paths; | |
# or if you prefer installing one by one | |
#foreach my $m (@module_paths) { | |
# exit 255 if system $perl6bin, $zefbin, | |
# '--/build-depends', '--/test-depends', '--/depends', | |
# '--/p6c', '--/metacpan', '--/cpan', | |
# '--force', '--/test', 'install', $m; | |
#} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment