Commit | Line | Data |
43b7182a |
1 | #!/usr/bin/perl |
2 | # contributed by hdp@cpan.org |
3 | |
4 | use strict; |
5 | use warnings; |
6 | use CPAN; |
7 | use Cwd; |
8 | use File::Spec; |
caac8b21 |
9 | my $target = $ENV{TARGET} ? Cwd::abs_path($ENV{TARGET}) : undef; |
43b7182a |
10 | |
11 | my $mod = CPAN::Shell->expand(Module => "local::lib"); |
12 | $mod->get; |
13 | my $dir = CPAN::Shell->expand(Distribution => $mod->cpan_file)->dir; |
14 | chdir($dir); |
15 | my $make = $CPAN::Config->{make}; |
16 | my $bootstrap = $target ? "--bootstrap=$target" : "--bootstrap"; |
caac8b21 |
17 | system($^X, 'Makefile.PL', $bootstrap) && exit 1; |
43b7182a |
18 | system($make, 'test') && exit 1; |
19 | system($make, 'install') && exit 1; |