Skip to content

Instantly share code, notes, and snippets.

@JuPlutonic
Forked from ashwinvis/install_stow.sh
Last active November 25, 2019 11:45
Show Gist options
  • Save JuPlutonic/f4594679a6be2a2bc37e9870ee9ea08a to your computer and use it in GitHub Desktop.
Save JuPlutonic/f4594679a6be2a2bc37e9870ee9ea08a to your computer and use it in GitHub Desktop.
GNU stow and youtube-viewer (absent in CPAN) installation.
#!/bin/bash
# Set up CPAN, cpanm, youtube-viewer, po4a[x], stow
# 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
# Stow
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
# Youtube-viewer
# See the formula here: https://github.com/Homebrew/homebrew-core/pull/43254/files/ebfb2fbdcfa855c6ef0f85c198441889392af1ec#diff-33d2028c026f3f8d1712348881a27c0f
cd /tmp
wget https://github.com/trizen/youtube-viewer/archive/3.5.6.tar.gz
tar xzf 3.5.6.tar.gz
cd 3.5.6/
cpanm List::Util
perl Build.PL --install_base `perl -le 'print $INC[0]'`
./Build install
# which youtube-viewer
# PO4A
# See the formula here: https://gist.github.com/munepi/d55b5c8441427ff6f47e682c44d185cc
# cd /tmp
# wget http://ftp.debian.org/debian/pool/main/p/po4a/po4a_0.55.orig.tar.gz
# tar xzf po4a_0.55.orig.tar.gz
# cd po4a_0.55.orig/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment