Skip to content

Instantly share code, notes, and snippets.

@tadzik
Created February 4, 2012 15:23
Show Gist options
  • Save tadzik/1738468 to your computer and use it in GitHub Desktop.
Save tadzik/1738468 to your computer and use it in GitHub Desktop.
#!/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