Created
July 30, 2011 05:53
-
-
Save fcoury/1115247 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
apt-get update | |
apt-get install -y build-essential libssl-dev libncurses5-dev libreadline5-dev zlib1g-dev linux-headers-generic libsqlite3-dev | |
cd /tmp | |
wget http://repo.webbynode.com/ruby-1.9.2-p290_i386.deb | |
dpkg -i ruby-1.9.2-p290_i386.deb | |
rm ruby-1.9.2-p290_i386.deb | |
test -f /usr/local/bin/ruby && rm /usr/local/bin/ruby | |
test -f /usr/local/bin/rake && rm /usr/local/bin/rake | |
test -f /usr/local/bin/gem && rm /usr/local/bin/gem | |
test -f /usr/local/bin/irb && rm /usr/local/bin/irb | |
ln -s /usr/bin/ruby /usr/local/bin/ruby | |
ln -s /usr/bin/rake /usr/local/bin/rake | |
ln -s /usr/bin/gem /usr/local/bin/gem | |
ln -s /usr/bin/irb /usr/local/bin/irb | |
gem update --system | |
hash -r | |
new_version=`ruby -v` | |
echo "" | |
if (echo $new_version | grep -q "p290"); then | |
echo Upgrade successful. New ruby version: $new_version | |
else | |
echo There was a problem upgrading ruby version to 1.9.2-p290. | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This is new content