Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Comparing changes

Choose two branches to see what's changed or to start a new pull request. If you need to, you can also compare across forks.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also compare across forks.
...
Checking mergeability… Don't worry, you can still create the pull request.
  • 14 commits
  • 7 files changed
  • 0 commit comments
  • 3 contributors
Commits on Sep 17, 2012
@FROGGS FROGGS batch wrapper for windows guys 5e4ee61
@tadzik Merge pull request #17 from FROGGS/master
added bin/panda.bat
56149b2
@FROGGS FROGGS quote dest dir
There can be spaces in path like in the default directory under windows. HOME under windows is `C:\Documents and Settings\...`
6b188a2
@tadzik Merge pull request #18 from FROGGS/master
Quoting $dest dir
978dec0
@FROGGS FROGGS using absolute path to original panda script file 7fce5bc
@FROGGS FROGGS Merge branch 'master' of github.com:FROGGS/panda 50c4156
@tadzik Merge pull request #19 from FROGGS/master
Using absolute path to panda script
2db413d
@FROGGS FROGGS absolute paths on windows never start with a slash
`$home` already is `C:\Documents and ...`, you can't put cwd before that.
d519ac8
Commits on Sep 18, 2012
@tadzik Merge pull request #20 from FROGGS/master
fixing destdir, windows absolute paths dont start with slash
a918d53
Commits on Sep 30, 2012
@tadzik [Panda::Tester] Use $*EXECUTABLE_NAME instead of hardcoded "perl6" c731c4d
@tadzik [Panda::Builder] Use $*EXECUTABLE_NAME instead of hardcoded "perl6", …
…pmichaud++
2ef186a
Commits on Oct 14, 2012
@moritz moritz stop installing to ~/.perl6
requires a pretty new Rakudo with $*CUSTOM-LIB support
c181c9a
Commits on Oct 22, 2012
@moritz moritz update bin/panda and bootstrap.pl to use %*CUSTOM_LIB
TODO: rebootstrap
6dfed95
@moritz moritz switch rebootstrap to %*CUSTOM_LIB 109e54c
View
18 bin/panda
@@ -87,12 +87,18 @@ if %*ENV<PANDA_DEFAULT_OPTS> {
# initialize the Panda object
my $panda;
{
- my $home = $*OS eq 'MSWin32' ?? %*ENV<HOMEDRIVE> ~ %*ENV<HOMEPATH> !! %*ENV<HOME>;
- my $pandadir = "$home/.panda";
- mkpath $pandadir unless $pandadir.IO ~~ :d;
-
- my $destdir = %*ENV<DESTDIR> || "$home/.perl6";
- $destdir = "{cwd}/$destdir" unless $destdir ~~ /^ '/' /;
+ my $pandadir;
+ my $destdir = %*ENV<DESTDIR>;
+ $destdir = "{cwd}/$destdir" if defined($destdir) && $*OS ne 'MSWin32' && $destdir !~~ /^ '/' /;
+ for grep(*.defined, $destdir, %*CUSTOM_LIB<site home>) -> $prefix {
+ $destdir = $prefix;
+ $pandadir = "$prefix/panda";
+ try mkpath $pandadir unless $pandadir.IO ~~ :d;
+ last if $pandadir.path.w
+ }
+ unless $pandadir.path.w {
+ die "Found no writable directory into which panda could be installed";
+ }
$panda = Panda.new(
srcdir => "$pandadir/src",
View
14 bin/panda.bat
@@ -0,0 +1,14 @@
+@rem = '--*-Perl-*--
+@echo off
+if "%OS%" == "Windows_NT" goto WinNT
+perl6 "%~dp0\%0" %1 %2 %3 %4 %5 %6 %7 %8 %9
+goto endofperl
+:WinNT
+perl6 "%~dp0\%0" %*
+if NOT "%COMSPEC%" == "%SystemRoot%\system32\cmd.exe" goto endofperl
+if %errorlevel% == 9009 echo You do not have Perl in your PATH.
+if errorlevel 1 goto script_failed_so_exit_with_non_zero_val 2>nul
+goto endofperl
+@rem ';
+__END__
+:endofperl
View
23 bootstrap.pl
@@ -4,24 +4,31 @@
say '==> Bootstrapping Panda';
my $is_win = $*OS eq 'MSWin32';
-my $home = $is_win ?? %*ENV<HOMEDRIVE> ~ %*ENV<HOMEPATH> !! %*ENV<HOME>;
-mkdir $home unless $home.IO.d;
-mkdir "$home/.panda" unless "$home/.panda".IO.d;
+my $panda-base;
+my $destdir = %*ENV<DESTDIR>;
+$destdir = "{cwd}/$destdir" if defined($destdir) && $*OS ne 'MSWin32' && $destdir !~~ /^ '/' /;
+for grep(*.defined, $destdir, %*CUSTOM_LIB<site home>) -> $prefix {
+ $destdir = $prefix;
+ $panda-base = "$prefix/panda";
+ try mkdir $destdir;
+ try mkdir $panda-base unless $panda-base.IO ~~ :d;
+ last if $panda-base.path.w
+}
+unless $panda-base.path.w {
+ die "Found no writable directory into which panda could be installed";
+}
my $projects = slurp 'projects.json.bootstrap';
$projects ~~ s:g/_BASEDIR_/{cwd}\/ext/;
$projects .= subst('\\', '/', :g) if $is_win;
-given open "$home/.panda/projects.json", :w {
+given open "$panda-base/projects.json", :w {
.say: $projects;
.close;
}
my $env_sep = $is_win ?? ';' !! ':';
-my $destdir = %*ENV<DESTDIR> || "$home/.perl6";
- $destdir = "{cwd}/$destdir" unless $destdir ~~ /^ '/' /
- || $is_win && $destdir ~~ /^ [ '\\' | <[a..zA..Z]> ':' ] /;
%*ENV<PERL6LIB> ~= "{$env_sep}$destdir/lib";
%*ENV<PERL6LIB> ~= "{$env_sep}{cwd}/ext/File__Tools/lib";
@@ -31,4 +38,4 @@
shell "perl6 bin/panda install File::Tools JSON::Tiny Test::Mock {cwd}";
-unlink "$home/.panda/projects.json";
+unlink "$panda-base/projects.json";
View
2  lib/Panda/Builder.pm
@@ -47,7 +47,7 @@ class Panda::Builder does Pies::Builder {
$file.IO.copy: "blib/{$file.dir}/{$file.name}";
next if $file ~~ /\.pod$/;
say "Compiling $file";
- shell "perl6 --target=pir "
+ shell "$*EXECUTABLE_NAME --target=pir "
~ "--output=blib/{$file.dir}/"
~ "{$file.name.subst(/\.pm6?$/, '.pir')} $file"
and die $p, "Failed building $file";
View
2  lib/Panda/Fetcher.pm
@@ -34,7 +34,7 @@ class Panda::Fetcher does Pies::Fetcher {
and die $p, "Failed updating the repo";
};
} else {
- shell "git clone -q $url $dest"
+ shell "git clone -q $url \"$dest\""
and die $p, "Failed cloning the repo";
}
View
2  lib/Panda/Tester.pm
@@ -12,7 +12,7 @@ class Panda::Tester does Pies::Tester {
indir $!resources.workdir($p), {
if 't'.IO ~~ :d {
withp6lib {
- my $c = "prove -e perl6 -r t/";
+ my $c = "prove -e $*EXECUTABLE_NAME -r t/";
shell $c and die $p, "Tests failed";
}
}
View
17 rebootstrap.pl
@@ -4,10 +4,15 @@
use Shell::Command;
# Find old state file
-my $home = $*OS eq 'MSWin32' ?? %*ENV<HOMEDRIVE> ~ %*ENV<HOMEPATH> !! %*ENV<HOME>;
-my $state-file = "$home/.panda/state";
+my ($prefix, $state-file);
+for grep(*.defined, %*ENV<DESTDIR>, %*CUSTOM_LIB<site home>) {
+ if "$_/panda/state".path.e {
+ $prefix = $_;
+ $state-file = "$_/panda/state";
+ }
+}
-if not $state-file.IO.e {
+if not $state-file.defined {
say "No need to rebootstrap, running normal bootstrap";
shell 'perl6 bootstrap.pl';
exit 0;
@@ -32,11 +37,11 @@
# Clean old directories, boostrap a fresh panda,
# and reinstall all manually-installed modules
-rm_rf "$home/.perl6/lib";
-rm_rf "$home/.panda";
+rm_rf "$prefix/lib";
+rm_rf "$prefix/panda";
shell 'perl6 bootstrap.pl';
say "==> Reinstalling @modules[]";
shell "panda install @modules[]";
-# Save the backup state file back to ~/.panda/
+# Save the backup state file back to $prefix/panda/
spurt "$state-file.bak", $old-state if $old-state;

No commit comments for this range

Something went wrong with that request. Please try again.