Skip to content

Commit

Permalink
Remove rebootstrap from bin/, it has no chance to work this way
Browse files Browse the repository at this point in the history
  • Loading branch information
Tadeusz Sośnierz committed Aug 15, 2012
1 parent 1c0574e commit 29c237f
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions rebootstrap.pl
@@ -0,0 +1,28 @@
#!/usr/bin/env perl6
use v6;

my $home = $*OS eq 'MSWin32' ?? %*ENV<HOMEDRIVE> ~ %*ENV<HOMEPATH> !! %*ENV<HOME>;

if not "$home/.panda/state".IO.e {
say "No need to rebootstrap, running normal bootstrap";
run 'perl6 bootstrap.pl';
}

my @modules;

given open("$home/.panda/state") {
for .lines() -> $line {
my ($name, $state) = split /\s/, $line;
next if $name eq any(<File::Tools JSON::Tiny Test::Mock panda>);
if $state eq 'installed' {
@modules.push: $name;
}
}
.close;
}

# TODO: Make me cross-platform
shell 'rm -rf ~/.perl6/lib';
shell 'rm -rf ~/.panda';
shell 'perl6 bootstrap.pl';
shell "panda install @modules[]";

0 comments on commit 29c237f

Please sign in to comment.