Update RVM and use rvm all do instead of for loop
This commit is contained in:
parent
a98a35a592
commit
dcfc4856af
25
install/rvm
25
install/rvm
|
@ -9,36 +9,39 @@ if ! command_exists rvm; then
|
||||||
|
|
||||||
echo-g "==> Rvm: Install rubies"
|
echo-g "==> Rvm: Install rubies"
|
||||||
# Install rubies and update rubygems
|
# Install rubies and update rubygems
|
||||||
rvm install 1.9.3
|
rvm install 1.8.7
|
||||||
rvm install 1.8.7-p371
|
rvm install 2.0.0
|
||||||
|
|
||||||
# But ultimately, the system should be the default
|
# But ultimately, the system should be the default
|
||||||
rvm --default use system
|
rvm --default use system
|
||||||
|
|
||||||
# A few prerequisites
|
# A few prerequisites
|
||||||
sudo gem install bluecloth capistrano bundler colorize
|
sudo gem install bluecloth capistrano bundler colorize
|
||||||
|
fi
|
||||||
|
|
||||||
else
|
# Update it
|
||||||
# Otherwise, update it
|
|
||||||
|
|
||||||
# Make sure rvm is sourced properly
|
# Make sure rvm is sourced properly
|
||||||
if [ -f ~/.rvm/scripts/rvm ]; then
|
if [ -f ~/.rvm/scripts/rvm ]; then
|
||||||
[ "$(type rvm | grep function)" ] || source ~/.rvm/scripts/rvm
|
[ "$(type rvm | grep function)" ] || source ~/.rvm/scripts/rvm
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Update RVM
|
||||||
|
echo-g "==> Rvm: Updating"
|
||||||
|
rvm get stable
|
||||||
|
|
||||||
# Update all rubies and rubygems
|
# Update all rubies and rubygems
|
||||||
for v in 1.9.3 1.8.7; do
|
echo-g "==> Rvm: Updating rubies"
|
||||||
echo-g "==> Rvm: Updating ruby $v"
|
rvm all do gem update --system
|
||||||
rvm use $v
|
rvm all do gem update
|
||||||
gem update --system
|
|
||||||
gem update
|
|
||||||
done
|
|
||||||
|
|
||||||
# Update system ruby
|
# Update system ruby
|
||||||
echo-g "==> Rvm: Updating system ruby"
|
echo-g "==> Rvm: Updating system ruby"
|
||||||
rvm use system
|
rvm use system
|
||||||
sudo gem update --system
|
sudo gem update --system
|
||||||
sudo gem update
|
sudo gem update
|
||||||
fi
|
|
||||||
|
echo-g "==> Rvm: Cleaning up"
|
||||||
|
rvm cleanup all
|
||||||
|
|
||||||
echo-g "==> Rvm: DONE!"
|
echo-g "==> Rvm: DONE!"
|
||||||
|
|
Loading…
Reference in a new issue