Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Remove rebootstrap from bin/, it has no chance to work this way
- 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.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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[]"; |