-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
118 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
# -*- cperl -*- | ||
eval 'exec $CBROOT/bin/perl -w $0 ${1+"$@"}' | ||
if my $running_under_some_shell; | ||
use strict; | ||
use warnings; | ||
use File::Path qw(mkpath); | ||
use Config; | ||
|
||
my $root = $ENV{CBROOTLOCAL} or die "Need CBROOTLOCAL\n"; | ||
my $base = $root . q[/cpan]; | ||
|
||
my $arch_dir = $base . "/lib/perl5/" . $Config::Config{archname}; | ||
unless (-d $arch_dir) { | ||
mkpath($arch_dir) || die "Cannot create $arch_dir: $!\n"; | ||
# Restart ourselves to get PERL5LIB setup | ||
exec($0,@ARGV); | ||
} | ||
|
||
die "$base does not exists" unless -d $base; | ||
|
||
require CPAN::MyConfig; | ||
require CPAN::FirstTime; | ||
|
||
$CPAN::Config->{makepl_arg} = q[INSTALL_BASE=] . $base . q[ INSTALLBASE=] . $base; | ||
$CPAN::Config->{mbuildpl_arg} = q[--install_base ] . $base; | ||
|
||
# Should get this from config | ||
$CPAN::Config->{urllist} = [ | ||
'http://mirror.uta.edu/CPAN', | ||
'ftp://mirrors.kernel.org/pub/CPAN', | ||
'http://cpan.mirrorgeek.com' | ||
]; | ||
|
||
CPAN::FirstTime::init("/dev/null", | ||
autoconfig => 1, | ||
); | ||
warn Data::Dumper::Dumper($CPAN::Config); | ||
require CPAN; | ||
CPAN::shell(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
package CPAN::MyConfig; | ||
|
||
$CPAN::Config = { | ||
'cpan_home' => '/tmp/cpan', | ||
'show_unparsable_versions' => 0, | ||
'show_upload_date' => 0, | ||
'mbuild_install_build_command' => './Build', | ||
'lynx' => '', | ||
'yaml_load_code' => 0, | ||
'ncftp' => '', | ||
'urllist' => [ | ||
'http://mirror.uta.edu/CPAN', | ||
'ftp://mirrors.kernel.org/pub/CPAN', | ||
'http://cpan.mirrorgeek.com' | ||
], | ||
'ncftpget' => '', | ||
'prefer_installer' => 'MB', | ||
'yaml_module' => 'YAML', | ||
'build_requires_install_policy' => 'ask/yes', | ||
'getcwd' => 'cwd', | ||
'no_proxy' => '', | ||
'build_cache' => 100, | ||
'make_arg' => '', | ||
'wget' => '', | ||
'auto_commit' => 0, | ||
'patch' => '/usr/bin/patch', | ||
'ftp_proxy' => '', | ||
'ftp_passive' => 1, | ||
'tar' => '/usr/bin/tar', | ||
'inactivity_timeout' => 0, | ||
'use_sqlite' => 0, | ||
'scan_cache' => 'atstart', | ||
'cache_metadata' => 1, | ||
'show_zero_versions' => 0, | ||
'term_ornaments' => 1, | ||
'build_dir_reuse' => 1, | ||
'shell' => '/bin/bash', | ||
'prerequisites_policy' => 'ask', | ||
'mbuild_arg' => '', | ||
'applypatch' => '', | ||
'inhibit_startup_message' => 0, | ||
'load_module_verbosity' => 'v', | ||
'commandnumber_in_prompt' => 1, | ||
'mbuild_install_arg' => '', | ||
'index_expire' => 1, | ||
'check_sigs' => 0, | ||
'test_report' => 0, | ||
'tar_verbosity' => 'v', | ||
'term_is_latin' => 1, | ||
'make_install_arg' => '', | ||
'histsize' => 100, | ||
'colorize_output' => 0, | ||
'http_proxy' => '' | ||
}; | ||
|
||
|
||
1; |