Fix buggy assumption that bash exists in /bin.

While here avoid bashisms in the first place.
This commit is contained in:
Eitan Adler 2012-10-21 10:26:23 -04:00 committed by Florian Staudacher
parent 9b75f1a83e
commit 2e95183bba

14
.rvmrc
View file

@ -1,19 +1,19 @@
#!/bin/bash #!/bin/sh
source ./script/env/ruby_env . ./script/env/ruby_env
if [ -e '.rvmrc.local' ]; then if [ -e '.rvmrc.local' ]; then
source .rvmrc.local; . .rvmrc.local;
elif [ -e '.rvmrc_custom' ] ; then elif [ -e '.rvmrc_custom' ] ; then
source .rvmrc_custom; . .rvmrc_custom;
else else
if rvm list strings | grep -q "$ruby_version" ; then if rvm list strings | grep -q "$ruby_version" ; then
rvm --create use "$ruby_version@$gemset" rvm --create use "$ruby_version@$gemset"
else else
echo -e "\e[00;31mPLEASE INSTALL RUBY $ruby_version WITH \`rvm install $ruby_version\`" printf "\e[00;31mPLEASE INSTALL RUBY $ruby_version WITH \`rvm install $ruby_version\`"
echo -e "Don't forget to run \`cd .. && cd -\` afterwards!\e[00m" printf "Don't forget to run \`cd .. && cd -\` afterwards!\e[00m"
return 1 return 1
fi fi
fi fi
source ./script/env/ensure_right_rubygems . ./script/env/ensure_right_rubygems