diff --git a/dev/python/.config/flake8 b/dev/pyenv/.config/flake8 similarity index 100% rename from dev/python/.config/flake8 rename to dev/pyenv/.config/flake8 diff --git a/dev/pyenv/aliases.zsh b/dev/pyenv/aliases.zsh new file mode 100644 index 00000000..f2e007a8 --- /dev/null +++ b/dev/pyenv/aliases.zsh @@ -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' diff --git a/dev/python/env.zsh b/dev/pyenv/env.zsh similarity index 100% rename from dev/python/env.zsh rename to dev/pyenv/env.zsh diff --git a/dev/pyenv/install b/dev/pyenv/install new file mode 100755 index 00000000..97de08e0 --- /dev/null +++ b/dev/pyenv/install @@ -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 diff --git a/dev/pyenv/update b/dev/pyenv/update new file mode 100755 index 00000000..d2cc1384 --- /dev/null +++ b/dev/pyenv/update @@ -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 diff --git a/dev/python/aliases.zsh b/dev/python/aliases.zsh deleted file mode 100644 index 3b27188b..00000000 --- a/dev/python/aliases.zsh +++ /dev/null @@ -1,5 +0,0 @@ -alias py='python' -alias py2='python2' -alias py3='python3' -alias pye='pyenv' -alias ipy='ipython' diff --git a/dev/python/install b/dev/python/install deleted file mode 100755 index 8baf78f9..00000000 --- a/dev/python/install +++ /dev/null @@ -1,5 +0,0 @@ -#!/usr/bin/env bash - -if [[ ! -d "$HOME/.pyenv" ]]; then - git clone https://github.com/yyuu/pyenv.git $HOME/.pyenv -fi diff --git a/dev/ruby/.irbrc b/dev/rbenv/.irbrc similarity index 100% rename from dev/ruby/.irbrc rename to dev/rbenv/.irbrc diff --git a/dev/ruby/.pryrc b/dev/rbenv/.pryrc similarity index 100% rename from dev/ruby/.pryrc rename to dev/rbenv/.pryrc diff --git a/dev/ruby/.rspec b/dev/rbenv/.rspec similarity index 100% rename from dev/ruby/.rspec rename to dev/rbenv/.rspec diff --git a/dev/ruby/aliases.zsh b/dev/rbenv/aliases.zsh similarity index 100% rename from dev/ruby/aliases.zsh rename to dev/rbenv/aliases.zsh diff --git a/dev/ruby/env.zsh b/dev/rbenv/env.zsh similarity index 100% rename from dev/ruby/env.zsh rename to dev/rbenv/env.zsh diff --git a/dev/rbenv/install b/dev/rbenv/install new file mode 100755 index 00000000..ef8a2f02 --- /dev/null +++ b/dev/rbenv/install @@ -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 diff --git a/dev/rbenv/update b/dev/rbenv/update new file mode 100755 index 00000000..18c6f946 --- /dev/null +++ b/dev/rbenv/update @@ -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 diff --git a/dev/ruby/install b/dev/ruby/install deleted file mode 100755 index 3f8472ba..00000000 --- a/dev/ruby/install +++ /dev/null @@ -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