Skip to content

Instantly share code, notes, and snippets.

@tamvm
tamvm / install-rbenv.sh
Created April 21, 2014 09:26
Install rbenv
#!/bin/bash
echo '# rbenv setup - only add RBENV PATH variables if no single user install found' > /etc/profile.d/rbenv.sh
echo 'if [[ ! -d "${HOME}/.rbenv" ]]; then' >> /etc/profile.d/rbenv.sh
echo ' export RBENV_ROOT=/usr/local/rbenv' >> /etc/profile.d/rbenv.sh
echo ' export PATH="$RBENV_ROOT/bin:$PATH"' >> /etc/profile.d/rbenv.sh
echo ' eval "$(rbenv init -)"' >> /etc/profile.d/rbenv.sh
echo 'fi' >> /etc/profile.d/rbenv.sh
chmod +x /etc/profile.d/rbenv.sh