Ruby version manager (rvm) global install

by elebertus
3 deployments · 0 still active · last rev. 5 years ago

Compatible with: CentOS 5.6
						#!/bin/bash
rvm_install () {  # Global install for rvm
        if ! [[ -d /usr/local/bin/rvm ]]; then
                mkdir /usr/local/bin/rvm
                mkdir /usr/local/bin/rvm/{scripts,install}
        fi
        curl -s https://rvm.beginrescueend.com/install/rvm -o /usr/local/bin/rvm/rvm-installer &> /dev/null
        chmod +x /usr/local/bin/rvm/rvm-installer
        /usr/local/bin/rvm/rvm-installer --version latest
        sleep 2
        printf "%s[[ -s "/usr/local/bin/rvm/scrpts/rvm" ]] && source "/usr/local/bin/rvm/scripts/rvm"\n" >> ~/.bash_profile
        printf "%s[[ -s "/usr/local/bin/rvm/scrpts/rvm" ]] && source "/usr/local/bin/rvm/scripts/rvm"\n" >> /etc/bashrc
        source ~/.bash_profile
}