X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=eg%2Fscripted_install.pl;h=58f51a4f2e157a3f50a33cccc5b72d3ff34637d2;hb=a20a4a55bd90ff313b0aacd8a79e9f8ef644c0d0;hp=91bb13f5c5502667e18b67624f2492855ab4bf98;hpb=caac8b2133bbb9d85da33aad93bc5704ca756c04;p=p5sagit%2Flocal-lib.git diff --git a/eg/scripted_install.pl b/eg/scripted_install.pl index 91bb13f..58f51a4 100644 --- a/eg/scripted_install.pl +++ b/eg/scripted_install.pl @@ -1,19 +1,19 @@ -#!/usr/bin/perl -# contributed by hdp@cpan.org - -use strict; -use warnings; -use CPAN; -use Cwd; -use File::Spec; +#!/usr/bin/perl +# contributed by hdp@cpan.org + +use strict; +use warnings; +use CPAN; +use Cwd; +use File::Spec; my $target = $ENV{TARGET} ? Cwd::abs_path($ENV{TARGET}) : undef; - -my $mod = CPAN::Shell->expand(Module => "local::lib"); -$mod->get; -my $dir = CPAN::Shell->expand(Distribution => $mod->cpan_file)->dir; -chdir($dir); -my $make = $CPAN::Config->{make}; -my $bootstrap = $target ? "--bootstrap=$target" : "--bootstrap" + +my $mod = CPAN::Shell->expand(Module => "local::lib"); +$mod->get; +my $dir = CPAN::Shell->expand(Distribution => $mod->cpan_file)->dir; +chdir($dir); +my $make = $CPAN::Config->{make}; +my $bootstrap = $target ? "--bootstrap=$target" : "--bootstrap"; system($^X, 'Makefile.PL', $bootstrap) && exit 1; -system($make, 'test') && exit 1; -system($make, 'install') && exit 1; +system($make, 'test') && exit 1; +system($make, 'install') && exit 1;