Skip to content

Commit

Permalink
regen
Browse files Browse the repository at this point in the history
  • Loading branch information
gugod committed Apr 17, 2010
1 parent 74bdaef commit 24fd7a6
Showing 1 changed file with 23 additions and 5 deletions.
28 changes: 23 additions & 5 deletions perlbrew
Original file line number Diff line number Diff line change
Expand Up @@ -802,7 +802,7 @@ HELP

sub run_command_init {
require File::Path;
File::Path::make_path(
File::Path::mkpath(
"$ROOT/perls", "$ROOT/dists", "$ROOT/build", "$ROOT/etc",
"$ROOT/bin"
);
Expand All @@ -826,7 +826,7 @@ Perlbrew environment initiated, required directories are created under
$ROOT
Well-done! Congradulations! Please add the following line to the end
Well-done! Congratulations! Please add the following line to the end
of your ~/.${yourshrc}
source $ROOT/etc/${shrc}
Expand Down Expand Up @@ -868,7 +868,7 @@ sub run_command_install {
exit;
}

File::Path::make_path("$ROOT/bin");
File::Path::mkpath("$ROOT/bin");
File::Copy::copy($executable, $target);
chmod(0755, $target);

Expand Down Expand Up @@ -937,7 +937,14 @@ HELP
my $as = $self->{as} || $dist;
unshift @d_options, qq(prefix=$ROOT/perls/$as);
push @d_options, "usedevel" if $dist_version =~ /5\.11/;
print "Installing $dist...";
print "Installing $dist into $ROOT/perls/$as\n";
print <<INSTALL if $self->{quiet} && !$self->{verbose};
This would take a while. You can run the following command on another shell to track the status:
tail -f $self->{log_file}
INSTALL

my $tarx = "tar " . ( $dist_tarball =~ /bz2/ ? "xjf" : "xzf" );

my $cmd = join ";",
Expand All @@ -956,7 +963,18 @@ HELP
);
$cmd = "($cmd) >> '$self->{log_file}' 2>&1 "
if ( $self->{quiet} && !$self->{verbose} );
system($cmd);
print !system($cmd) ? <<SUCCESS : <<FAIL;
Installed $dist as $as successfully. Run the following command to switch to it.
perlbrew switch $as
SUCCESS
Installing $dist failed. See $self->{log_file} to see why.
If you want to force install the distribution, try:

perlbrew --force install $dist_name

FAIL
}
}

Expand Down

0 comments on commit 24fd7a6

Please sign in to comment.