Created
November 19, 2011 18:23
-
-
Save tadzik/1379175 to your computer and use it in GitHub Desktop.
Testing modules on nom
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
#!/usr/bin/env perl6 | |
use Panda; | |
use Shell::Command; | |
my $panda; | |
{ | |
my $pandadir = %*ENV<HOME> ~ '/.panda'; | |
mkpath $pandadir unless $pandadir.IO ~~ :d; | |
my $projectsfile = "$pandadir/projects.json"; | |
unless $projectsfile.IO ~~ :f { | |
shell "wget http://feather.perl6.nl:3000/list -O $projectsfile"; | |
} | |
$panda = Panda.new( | |
srcdir => "$pandadir/src", | |
destdir => %*ENV<HOME> ~ '/.perl6', | |
statefile => "$pandadir/state", | |
projectsfile => "$pandadir/projects.json" | |
); | |
} | |
for $panda.ecosystem.project-list -> $p { | |
say "[MASSTEST] => Trying '$p'"; | |
my $x = $panda.ecosystem.get-project($p); | |
if $panda.ecosystem.project-get-state($x) ne 'absent' { | |
say "[MASSTEST] => Looks like '$p' got installed already"; | |
} else { | |
try { | |
$panda.resolve($p); | |
} | |
if defined $! { | |
say "[MASSTEST] => Installing '$p' has failed: '$!'"; | |
} else { | |
say "[MASSTEST] => Seems that '$p' works fine on nom"; | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment