From ca51d518dc21ad78545523127e0fd3b21d11a12b Mon Sep 17 00:00:00 2001 From: Drew Short Date: Wed, 4 Nov 2015 12:28:53 -0500 Subject: [PATCH] Adding RBENV --- home/.zshrc | 6 ++++++ scripts/bootstrap.sh | 12 +++++++++--- scripts/tools.sh | 5 +++-- 3 files changed, 18 insertions(+), 5 deletions(-) diff --git a/home/.zshrc b/home/.zshrc index 2e523fc..98a08c0 100644 --- a/home/.zshrc +++ b/home/.zshrc @@ -42,3 +42,9 @@ export PATH="$PATH:$HOME/go/bin" if [ -f "$HOME/.update_dotfiles.sh" ]; then /usr/bin/env sh $HOME/.update_dotfiles.sh fi + +# rbenv setup +if [ -d "$HOME/.rbenv" ]; then + export PATH="$HOME/.rbenv/bin:$PATH" + eval "$(rbenv init -)" +fi diff --git a/scripts/bootstrap.sh b/scripts/bootstrap.sh index 77008a5..ff3e472 100755 --- a/scripts/bootstrap.sh +++ b/scripts/bootstrap.sh @@ -95,9 +95,9 @@ link "$HOME" ".gitconfig" "$DOTFILES_HOME/.gitconfig" # Configure .zshrc link "$HOME" ".zshrc" "$DOTFILES_HOME/.zshrc" -clone_git_repo $HOME/.tmux/plugins/tpm https://github.com/tmux-plugins/tpm.git -clone_git_repo $HOME/.tmux/plugins/tmux-sensible https://github.com/tmux-plugins/tmux-sensible.git -clone_git_repo $HOME/.tmux/plugins/tmux-resurrect https://github.com/tmux-plugins/tmux-resurrect.git +clone_or_update_git_repo $HOME/.tmux/plugins/tpm https://github.com/tmux-plugins/tpm.git +clone_or_update_git_repo $HOME/.tmux/plugins/tmux-sensible https://github.com/tmux-plugins/tmux-sensible.git +clone_or_update_git_repo $HOME/.tmux/plugins/tmux-resurrect https://github.com/tmux-plugins/tmux-resurrect.git # Configure .tmux.conf link "$HOME" ".tmux.conf" "$DOTFILES_HOME/.tmux.conf" @@ -118,6 +118,12 @@ for systemd_config in ${systemd_configs[@]}; do copy $SYSTEMD_CONFIG_HOME $systemd_config_name $systemd_config true true done +# Install/update rbenv and plugins +clone_or_update_git_repo $HOME/.rbenv https://github.com/sstephenson/rbenv.git +clone_or_update_git_repo $HOME/.rbenv/plugins/ruby-build https://github.com/sstephenson/ruby-build.git + +# <-- EDIT/ADD ABOVE THIS +# This should be the Last section cd $GIT_DIR # Create an auto updater for the dotfiles diff --git a/scripts/tools.sh b/scripts/tools.sh index f50eee0..f2e0f3f 100644 --- a/scripts/tools.sh +++ b/scripts/tools.sh @@ -83,8 +83,9 @@ escape_path() { echo $safe } -# Clone a git repository into a location -clone_git_repo() { +# Clone a git repository into a location +# Or update an existing repository +clone_or_update_git_repo() { local target=$1 local repo=$2 if [ ! -d "$target" ]; then