1. Takeshi Komiya
  2. dotfiles

Commits

Takeshi Komiya  committed 4e2a53a

Add plenv for setup perl binaries

  • Participants
  • Parent commits 355753f
  • Branches default

Comments (0)

Files changed (2)

File _zshrc

View file
     eval "$(pyenv init -)"
 fi
 
+if [ -d $HOME/.plenv ]; then
+    PATH=$HOME/.plenv/bin:$PATH
+    eval "$(plenv init -)"
+fi
+
 if [ -d $HOME/.rvm ]; then
     PATH=$HOME/.rvm/bin:$PATH
 fi

File setup.sh

View file
 pyenv global $REGULAR_PYTHON_VERSIONS
 
 echo ""
+echo "Setup plenv ..."
+if [ -d $HOME/.plenv ]; then
+    (cd $HOME/.plenv && git pull)
+    (cd $HOME/.plenv/plugins/perl-build && git pull)
+else
+    git clone https://github.com/tokuhirom/plenv $HOME/.plenv
+    git clone https://github.com/tokuhirom/Perl-Build $HOME/.plenv/plugins/perl-build
+
+    PATH=$HOME/.plenv/bin:$PATH
+    eval "$(plenv init -)"
+fi
+for version in 5.18.2; do
+    if [ ! -d "$HOME/.plenv/versions/$version" ]; then
+        plenv install $version -Dusethreads
+        plenv global $version
+        plenv install-cpanm
+    fi
+done
+plenv global 5.18.2
+
+echo ""
 echo "Setup $HOME/bin ..."
 if [ ! -d $HOME/bin ]; then
     mkdir -p $HOME/bin