#!/bin/bash if [[ -d ~/perl5 ]]; then echo You have ~/perl5, NOT installing perlbrew else echo Getting and installing perlbrew curl -LO http://xrl.us/perlbrew chmod +x perlbrew ./perlbrew install ./perlbrew init echo Put stuff in your path, logout, login, and run $0 again exit fi if [[ ! -f ~/perl5/perlbrew/bin/perl ]]; then echo Installing perl-5.13.4 perlbrew install perl-5.13.4 perlbrew switch perl-5.13.4 perl -v fi if [[ ! -f ~/perl5/perlbrew/perls/current/lib/site_perl/5.13.4/CPANPLUS/YACSmoke.pm ]]; then # $conf->set_conf( cpantest => '1' ); if grep cpantest ~/.cpanplus/lib/CPANPLUS/Config/User.pm | grep set_conf | grep 1; then echo Modify ~/.cpanplus/lib/CPANPLUS/Config/User.pm: echo 'Change $conf->set_conf( cpantest => 1 );' echo 'Into - $conf->set_conf( cpantest => 0 );' echo Then run $0 again exit fi echo Installing Task::CPANPLUS::Metabase and CPANPLUS::YACSmoke if [[ ! -f ~/perl5/bin/cpanp-run-perl ]]; then mkdir ~/perl5/bin ln -s ~/perl5/perlbrew/perls/current/bin/cpanp-run-perl5.13.4 ~/perl5/bin/cpanp-run-perl fi cpanp5.13.4 i Task::CPANPLUS::Metabase CPANPLUS::YACSmoke if grep cpantest ~/.cpanplus/lib/CPANPLUS/Config/User.pm | grep set_conf | grep 0; then echo Modify ~/.cpanplus/lib/CPANPLUS/Config/User.pm: echo 'Change $conf->set_conf( cpantest => 1 );' echo 'Into - $conf->set_conf( cpantest => 0 );' echo Then run $0 again exit fi fi echo All looks OK, run the following to test: echo yactool --test