Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Remove rebootstrap from bin/, it has no chance to work this way

  • Loading branch information...
commit 29c237f08311b11d3f8d6dfacddf60c5d5e49335 1 parent 1c0574e
@tadzik authored
Showing with 28 additions and 0 deletions.
  1. +28 −0 rebootstrap.pl
View
28 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[]";
Please sign in to comment.
Something went wrong with that request. Please try again.