-
-
Save addame/273960 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
| # This is a script to install both ruby 1.8.7 and 1.9.1, with suffixed binaries and aliased non-suffixed binaries | |
| mkdir -p /usr/local/src ; cd /usr/local/src | |
| wget ftp://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.1-p0.tar.bz2 | |
| tar -xjvf ruby-1.9.1-p0.tar.bz2 | |
| cd ruby-1.9.1-p0 | |
| ./configure --prefix=/usr --program-suffix=19 --enable-shared | |
| make && make install | |
| cd /usr/local/src | |
| wget ftp://ftp.ruby-lang.org/pub/ruby/1.8/ruby-1.8.7-p72.tar.gz | |
| tar -xjvf ruby-1.8.7-p72.tar.gz | |
| cd ruby-1.8.7-p72 | |
| ./configure --prefix=/usr --program-suffix=18 --enable-shared | |
| make && make install | |
| cd /usr/local/bin | |
| binaries=( erb gem irb rake rdoc ri ruby testrb ) | |
| for binary in ${binaries[@]}; do | |
| echo mv ${binary}{,~} | |
| echo ln -s $(pwd)/${binary}19 $(pwd)/${binary} | |
| done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment