File: scripted_install.pl

package info (click to toggle)
liblocal-lib-perl 2.000014-1
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 308 kB
  • ctags: 72
  • sloc: perl: 727; makefile: 22
file content (19 lines) | stat: -rw-r--r-- 540 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#!/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";
system($^X, 'Makefile.PL', $bootstrap) && exit 1;
system($make, 'test') && exit 1;
system($make, 'install') && exit 1;