MathHubInfo / Legacy-localmh

DEPRECATED - A cross-repository administration tool for the local authoring in MathHub.info
1 stars 0 forks source link

new command: lmh cpanm #298

Open angerhang opened 8 years ago

angerhang commented 8 years ago

In lmh docker shell, cpanm . seems to reinstall all the packages but I just want to have one of the plugins reinstalled. Can this be changed or is there a workaround?

angerhang commented 8 years ago

Currently we can only run cpanm . using

cpanm -l '/Users/yuancalvin/lmh/localmh/ext/perl5lib'  . 

can we make cpanm . install to the perl5lib base directory directly in the docker?

kohlhase commented 8 years ago

there is a way that you can make cpanm run locally. I forget where I saw this, but it told me to add the following to my .bashrc:

#CPANM local
PATH="/Users/kohlhase/localmh/ext/perl5lib/bin${PATH+:}${PATH}"; export PATH;
PERL5LIB="/Users/kohlhase/localmh/ext/perl5lib/lib/perl5${PERL5LIB+:}${PERL5LIB}"; export PERL5LIB;
PERL_LOCAL_LIB_ROOT="/Users/kohlhase/localmh/ext/perl5lib${PERL_LOCAL_LIB_ROOT+:}${PERL_LOCAL_LIB_ROOT}"; export PERL_LOCAL_LIB_ROOT;
PERL_MB_OPT="--install_base \"/Users/kohlhase/localmh/ext/perl5lib\""; export PERL_MB_OPT;
PERL_MM_OPT="INSTALL_BASE=/Users/kohlhase/localmh/ext/perl5lib"; export PERL_MM_OPT;

and that seems to work.

cmaeder commented 8 years ago

In my set up (for ash) I use the following:

export PERL_CPANM_OPT=--local-lib=/var/data/localmh/ext/perl5lib
export PATH=/var/data/localmh/ext/perl5lib/bin:$PATH
export PERL5LIB=/var/data/localmh/ext/perl5lib/lib/perl5
tkw1536 commented 8 years ago

I should add a command lmh cpanm to achieve something like this.

angerhang commented 8 years ago

that would be very nice

On 2016年3月4日, at 16:16, Tom Wiesing notifications@github.com wrote:

I should add a command lmh cpanm to achieve something like this.

— Reply to this email directly or view it on GitHub.