39 lines
		
	
	
		
			815 B
		
	
	
	
		
			Bash
		
	
	
		
			Executable file
		
	
	
	
	
			
		
		
	
	
			39 lines
		
	
	
		
			815 B
		
	
	
	
		
			Bash
		
	
	
		
			Executable file
		
	
	
	
	
#!/usr/bin/env zsh
 | 
						|
 | 
						|
export rvm_ignore_dotfiles=yes
 | 
						|
 | 
						|
if ! command_exists rvm; then
 | 
						|
    # If RVM's not installed, install it and the rubies
 | 
						|
    echo_g "==> Rvm: Installing"
 | 
						|
 | 
						|
    # https://rvm.io
 | 
						|
    curl -L https://get.rvm.io | bash -s stable
 | 
						|
else
 | 
						|
    # Update it
 | 
						|
 | 
						|
    # Make sure rvm is sourced properly
 | 
						|
    if [ -f ~/.rvm/scripts/rvm ]; then
 | 
						|
        [ "$(type rvm | grep function)" ] || source ~/.rvm/scripts/rvm
 | 
						|
    fi
 | 
						|
 | 
						|
    # Update RVM
 | 
						|
    echo_g "==> Rvm: Updating"
 | 
						|
    rvm get stable
 | 
						|
fi
 | 
						|
 | 
						|
# Update all rubies and rubygems
 | 
						|
echo_g "==> Rvm: Updating rubies"
 | 
						|
rvm all do gem update --system
 | 
						|
rvm all do gem update
 | 
						|
 | 
						|
# Only mac needs this
 | 
						|
if is_mac; then
 | 
						|
    # Update system ruby
 | 
						|
    echo_g "==> Rvm: Updating system ruby"
 | 
						|
    rvm use system
 | 
						|
    sudo gem update --system
 | 
						|
    sudo gem update
 | 
						|
fi
 | 
						|
 | 
						|
echo_g "==> Rvm: DONE!"
 |