ruby=>rbenv, python=>pyenv; add install+update scripts
This commit is contained in:
parent
bd640ce0d7
commit
37d376502b
6
dev/pyenv/aliases.zsh
Normal file
6
dev/pyenv/aliases.zsh
Normal file
|
@ -0,0 +1,6 @@
|
|||
alias py='python'
|
||||
command -v python2 >/dev/null && alias py2='python2'
|
||||
command -v python3 >/dev/null && alias py3='python3'
|
||||
|
||||
alias pye='pyenv'
|
||||
alias ipy='ipython'
|
8
dev/pyenv/install
Executable file
8
dev/pyenv/install
Executable file
|
@ -0,0 +1,8 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
if [[ -d "$HOME/.pyenv" ]]; then
|
||||
>&2 echo "~/.pyenv already exists, can't install."
|
||||
exit 1
|
||||
else
|
||||
git clone https://github.com/yyuu/pyenv.git $HOME/.pyenv
|
||||
fi
|
8
dev/pyenv/update
Executable file
8
dev/pyenv/update
Executable file
|
@ -0,0 +1,8 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
if [[ -d $HOME/.pyenv ]]; then
|
||||
cd $HOME/.pyenv && git pull
|
||||
for plugin in $HOME/.pyenv/plugins/*/; do
|
||||
cd "$plugin" && git pull
|
||||
done
|
||||
fi
|
|
@ -1,5 +0,0 @@
|
|||
alias py='python'
|
||||
alias py2='python2'
|
||||
alias py3='python3'
|
||||
alias pye='pyenv'
|
||||
alias ipy='ipython'
|
|
@ -1,5 +0,0 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
if [[ ! -d "$HOME/.pyenv" ]]; then
|
||||
git clone https://github.com/yyuu/pyenv.git $HOME/.pyenv
|
||||
fi
|
9
dev/rbenv/install
Executable file
9
dev/rbenv/install
Executable file
|
@ -0,0 +1,9 @@
|
|||
#!/bin/bash
|
||||
|
||||
if [[ -d "$HOME/.rbenv" ]]; then
|
||||
>&2 echo "~/.rbenv already exists, can't install."
|
||||
exit 1
|
||||
else
|
||||
git clone https://github.com/rbenv/rbenv.git $HOME/.rbenv
|
||||
git clone https://github.com/rbenv/ruby-build.git $HOME/.rbenv/plugins/ruby-build
|
||||
fi
|
8
dev/rbenv/update
Executable file
8
dev/rbenv/update
Executable file
|
@ -0,0 +1,8 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
if [[ -d "$HOME/.rbenv" ]]; then
|
||||
cd $HOME/.rbenv && git pull
|
||||
for plugin in $HOME/.rbenv/plugins/*/; do
|
||||
cd "$plugin" && git pull
|
||||
done
|
||||
fi
|
|
@ -1,12 +0,0 @@
|
|||
#!/bin/bash
|
||||
|
||||
case "$OSTYPE" in
|
||||
darwin*)
|
||||
brew install rbenv
|
||||
;;
|
||||
linux*)
|
||||
git clone https://github.com/rbenv/rbenv.git $HOME/.rbenv
|
||||
cd $HOME/.rbenv && src/configure && make -C src
|
||||
git clone https://github.com/rbenv/ruby-build.git $HOME/.rbenv/plugins/ruby-build
|
||||
;;
|
||||
esac
|
Loading…
Reference in a new issue