let .rvmrc complain about not existing ruby instead of breaking systems
This commit is contained in:
parent
18e4e8b8a9
commit
ca1cc8c5f5
1 changed files with 12 additions and 2 deletions
14
.rvmrc
14
.rvmrc
|
|
@ -1,13 +1,23 @@
|
|||
#!/bin/bash
|
||||
|
||||
rubygems_version="1.8.24"
|
||||
ruby_version="1.9.3-p194"
|
||||
gemset="diaspora"
|
||||
|
||||
if [ -e '.rvmrc.local' ]; then
|
||||
source .rvmrc.local;
|
||||
elif [ -e '.rvmrc_custom' ] ; then
|
||||
source .rvmrc_custom;
|
||||
else
|
||||
rvm --create use ruby-1.9.3-p194@diaspora
|
||||
if rvm list strings | grep -q "$ruby_version" ; then
|
||||
rvm --create use "$ruby_version@$gemset"
|
||||
else
|
||||
echo -e "\e[00;31mPLEASE INSTALL RUBY $ruby_version WITH \`rvm install $ruby_version\`"
|
||||
echo -e "Don't forget to run \`cd .. && cd -\` afterwards!\e[00m"
|
||||
return 1
|
||||
fi
|
||||
fi
|
||||
|
||||
rubygems_version="1.8.24"
|
||||
|
||||
if [ "$(gem --version)" != "$rubygems_version" ]; then
|
||||
rvm rubygems "$rubygems_version"
|
||||
|
|
|
|||
Loading…
Reference in a new issue