Created
March 9, 2010 09:44
-
-
Save avsej/326441 to your computer and use it in GitHub Desktop.
This file contains 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/sh | |
# standard ubuntu gem pakage adds alternative for gem | |
# it should be removed first time | |
# | |
# update-alternatives --remove-all gem | |
update-alternatives --remove-all ruby | |
update-alternatives --install /usr/bin/ruby ruby /opt/ruby-enterprise/bin/ruby 600 \ | |
--slave /usr/bin/ri ri /opt/ruby-enterprise/bin/ri \ | |
--slave /usr/bin/erb erb /opt/ruby-enterprise/bin/erb \ | |
--slave /usr/bin/rdoc rdoc /opt/ruby-enterprise/bin/rdoc \ | |
--slave /usr/bin/gem gem /opt/ruby-enterprise/bin/gem \ | |
--slave /usr/bin/irb irb /opt/ruby-enterprise/bin/irb \ | |
--slave /usr/share/man/man1/ruby.1.gz ruby.1.gz \ | |
/opt/ruby-enterprise/share/man/man1/ruby.1.gz \ | |
update-alternatives --install /usr/bin/ruby ruby /usr/bin/ruby1.8 500 \ | |
--slave /usr/bin/ri ri /usr/bin/ri1.8 \ | |
--slave /usr/bin/erb erb /usr/bin/erb1.8 \ | |
--slave /usr/bin/rdoc rdoc /usr/bin/rdoc1.8 \ | |
--slave /usr/bin/gem gem /usr/bin/gem1.8 \ | |
--slave /usr/bin/irb irb /usr/bin/irb1.8 \ | |
--slave /etc/bash_completion.d/gem bash_completion_gem \ | |
/etc/bash_completion.d/gem1.8 \ | |
--slave /usr/share/man/man1/ruby.1.gz ruby.1.gz \ | |
/usr/share/man/man1/ruby1.8.1.gz \ | |
--slave /usr/share/man/man1/gem.1.gz gem.1.gz \ | |
/usr/share/man/man1/gem1.8.1.gz \ | |
--slave /usr/share/man/man1/erb.1.gz erb.1.gz \ | |
/usr/share/man/man1/erb1.8.1.gz \ | |
--slave /usr/share/man/man1/irb.1.gz irb.1.gz \ | |
/usr/share/man/man1/irb1.8.1.gz \ | |
--slave /usr/share/man/man1/ri.1.gz ri.1.gz \ | |
/usr/share/man/man1/ri1.8.1.gz | |
update-alternatives --install /usr/bin/ruby ruby /usr/bin/ruby1.9.1 400 \ | |
--slave /usr/bin/ri ri /usr/bin/ri1.9.1 \ | |
--slave /usr/bin/erb erb /usr/bin/erb1.9.1 \ | |
--slave /usr/bin/rdoc rdoc /usr/bin/rdoc1.9.1 \ | |
--slave /usr/bin/gem gem /usr/bin/gem1.9.1 \ | |
--slave /usr/bin/irb irb /usr/bin/irb1.9.1 \ | |
--slave /etc/bash_completion.d/gem bash_completion_gem \ | |
/etc/bash_completion.d/gem1.9.1 \ | |
--slave /usr/share/man/man1/ruby.1.gz ruby.1.gz \ | |
/usr/share/man/man1/ruby1.9.1.1.gz \ | |
--slave /usr/share/man/man1/gem.1.gz gem.1.gz \ | |
/usr/share/man/man1/gem1.9.1.1.gz \ | |
--slave /usr/share/man/man1/erb.1.gz erb.1.gz \ | |
/usr/share/man/man1/erb1.9.1.1.gz \ | |
--slave /usr/share/man/man1/irb.1.gz irb.1.gz \ | |
/usr/share/man/man1/irb1.9.1.1.gz \ | |
--slave /usr/share/man/man1/ri.1.gz ri.1.gz \ | |
/usr/share/man/man1/ri1.9.1.1.gz \ | |
--slave /usr/share/man/man1/rake.1.gz rake.1.gz \ | |
/usr/share/man/man1/rake1.9.1.1.gz | |
update-alternatives --install /usr/bin/ruby ruby /usr/local/bin/rubygit 400 \ | |
--slave /usr/bin/ri ri /usr/local/bin/rigit \ | |
--slave /usr/bin/erb erb /usr/local/bin/erbgit \ | |
--slave /usr/bin/rdoc rdoc /usr/local/bin/rdocgit \ | |
--slave /usr/bin/gem gem /usr/local/bin/gemgit \ | |
--slave /usr/bin/irb irb /usr/local/bin/irbgit \ | |
--slave /usr/share/man/man1/ruby.1.gz ruby.1.gz \ | |
/usr/local/man/man1/rubygit.1 \ | |
--slave /usr/share/man/man1/erb.1.gz erb.1.gz \ | |
/usr/local/man/man1/erbgit.1 \ | |
--slave /usr/share/man/man1/irb.1.gz irb.1.gz \ | |
/usr/local/man/man1/irbgit.1 \ | |
--slave /usr/share/man/man1/ri.1.gz ri.1.gz \ | |
/usr/local/man/man1/rigit.1 \ | |
--slave /usr/share/man/man1/rake.1.gz rake.1.gz \ | |
/usr/local/man/man1/rakegit.1 | |
# if you want use binaries from gems add line below to ~/.bashrc | |
# | |
# export PATH="$(gem env gempath | sed s/:/\\/bin:/g)/bin:$PATH" | |
# vim:et:ts=8: |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment