#!/bin/bash # CentOS rbenv installation script # Forked from https://gist.github.com/1237417 # Installs rbenv to user home on CentOS 5/6. if [[ -d "${HOME}/.rbenv" ]]; then echo >&2 "Error: ${HOME}/.rbenv already exists. Aborting installation."; exit 1; fi # Install rbenv git clone git://github.com/sstephenson/rbenv.git ~/.rbenv # Add rbenv to the path echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bash_profile echo 'eval "$(rbenv init -)"' >> ~/.bash_profile echo '---------------------------------' echo " rbenv installed to $HOME/.rbenv" echo ' Remember to restart your shell for the changes to take effect!' echo '---------------------------------'