Skip to content

Instantly share code, notes, and snippets.

@myui
Created February 25, 2021 05:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save myui/bc61366f09b8f778f65fb5241841ab6e to your computer and use it in GitHub Desktop.
Save myui/bc61366f09b8f778f65fb5241841ab6e to your computer and use it in GitHub Desktop.
#!/bin/bash
# Set up CPAN
# Append the following lines to .bashrc / .profile
# PERL_DIR=$HOME/.perl
# export PERL_LOCAL_LIB_ROOT=$PERL_DIR:${PERL_LOCAL_LIB_ROOT}
# export PATH=$PERL_DIR/bin:$PATH
# export PERL5LIB=$PERL_DIR/lib/perl5
# PERL_MB_OPT="--install_base \"${PERL_DIR}\""; export PERL_MB_OPT;
# PERL_MM_OPT="INSTALL_BASE=${PERL_DIR}"; export PERL_MM_OPT;
cpan
cpan App::cpanminus
cd /tmp
wget https://ftp.gnu.org/gnu/stow/stow-latest.tar.gz
tar xzf stow-latest.tar.gz
cd stow-2.3.1/
cpanm Test::Output
# eval `perl -V:siteprefix`
# echo $siteprefix
# ./configure --prefix=$siteprefix && make
# make clean
./configure --with-pmdir=`PERL5LIB= perl -le 'print $INC[0]'` && make
perl Build.PL
./Build install
which stow
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment