Created
October 24, 2012 08:27
-
-
Save hatak/3944823 to your computer and use it in GitHub Desktop.
install perlbrew + cpanm into project root dir
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
#!/bin/sh | |
PERL_STABLE="5.16.1" | |
PROJECT_ROOT=`pwd` | |
export PERLBREW_ROOT="${PROJECT_ROOT}/perl5" | |
echo | |
echo "#### Setup perl-${PERL_STABLE} into ${PERLBREW_ROOT}" | |
echo | |
curl -kL http://install.perlbrew.pl | bash | |
perlbrew install --notest perl-${PERL_STABLE} | |
curl -o ${PERLBREW_ROOT}/bin/cpanm -LO http://xrl.us/cpanm | |
[ ! -d ${PROJECT_ROOT}/bin ] && mkdir ${PROJECT_ROOT}/bin | |
[ ! -d ${PROJECT_ROOT}/extlib ] && mkdir ${PROJECT_ROOT}/extlib | |
echo | |
echo '#### Generate wrapper scripts' | |
echo | |
echo '## cpanm' | |
BIN_CPANM=${PROJECT_ROOT}/bin/cpanm | |
echo '#!/bin/sh' > ${BIN_CPANM} | |
echo "${PERLBREW_ROOT}/perls/perl-${PERL_STABLE}/bin/perl ${PERLBREW_ROOT}/bin/cpanm \$@" >> ${BIN_CPANM} | |
chmod a+x ${PROJECT_ROOT}/bin/cpanm | |
echo | |
echo '#### Finish!' | |
echo |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment