Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100755 29 lines (23 sloc) 0.687 kb
29c237f Tadeusz Sośnierz Remove rebootstrap from bin/, it has no chance to work this way
authored
1 #!/usr/bin/env perl6
2 use v6;
3
4 my $home = $*OS eq 'MSWin32' ?? %*ENV<HOMEDRIVE> ~ %*ENV<HOMEPATH> !! %*ENV<HOME>;
5
6 if not "$home/.panda/state".IO.e {
7 say "No need to rebootstrap, running normal bootstrap";
8 run 'perl6 bootstrap.pl';
9 }
10
11 my @modules;
12
13 given open("$home/.panda/state") {
14 for .lines() -> $line {
15 my ($name, $state) = split /\s/, $line;
16 next if $name eq any(<File::Tools JSON::Tiny Test::Mock panda>);
17 if $state eq 'installed' {
18 @modules.push: $name;
19 }
20 }
21 .close;
22 }
23
24 # TODO: Make me cross-platform
25 shell 'rm -rf ~/.perl6/lib';
26 shell 'rm -rf ~/.panda';
27 shell 'perl6 bootstrap.pl';
28 shell "panda install @modules[]";
Something went wrong with that request. Please try again.