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