bash/rvm-install in rvm-0.0.21 vs bash/rvm-install in rvm-0.0.22
- old
+ new
@@ -1,25 +1,25 @@
#!/bin/bash
user=`whoami`
if [ "$user" = "root" ] ; then
- echo -e "\e[0;31m <e> \e[0mroot user support is not yet implemented.\e[0m"
+ echo -e "\033[0;31m <e> \033[0mroot user support is not yet implemented.\033[0m"
exit 1
fi
-info="\n\e[0;32m<i>\e[0m"
-question="\n\e[0;32m<?>\e[0m"
+info="\n\033[0;32m<i>\033[0m"
+question="\n\033[0;32m<?>\033[0m"
echo -e "Installing rvm source to ~/.rvm/bin/rvm..."
mkdir -p ~/.rvm/src ~/.rvm/bin
cp $(pwd)/bash/rvm ~/.rvm/bin/
# State what is required to use rvm
-echo -e "\n\e[0;32mrvm\e[0m is a shell script that allows a user to manage multiple ruby versions in their own account."
+echo -e "\n\033[0;32mrvm\033[0m is a shell script that allows a user to manage multiple ruby versions in their own account."
echo -e "$info In order to use rvm two items must occur in your shell's load paths:"
-echo -e "\n\e[0;32m (a)\e[0m if [ -f ~/.rvm/bin/rvm ] ; then source ~/.rvm/bin/rvm ; fi"
-echo -e "\e[0;32m (b)\e[0m if [ -f ~/.rvm/current ] ; then source ~/.rvm/current ; fi"
+echo -e "\n\033[0;32m (a)\033[0m if [ -f ~/.rvm/bin/rvm ] ; then source ~/.rvm/bin/rvm ; fi"
+echo -e "\033[0;32m (b)\033[0m if [ -f ~/.rvm/current ] ; then source ~/.rvm/current ; fi"
while : ; do
echo -n -e "$question Do you want this (s)cript to set this up for you, or do it (m)anually yourself ('s' or 'm')? "
read response
if [ "${response:0:1}" = "s" ] ; then
@@ -76,26 +76,26 @@
echo "if [ -f ~/.rvm/current ] ; then source ~/.rvm/current ; fi" >> ~/.zshrc
fi
else
- echo -e "\n\e[0;31m<e> An error has occurred, we were expecting either bash or zsh however we encountered $user_shell \e[0m"
+ echo -e "\n\033[0;31m<e> An error has occurred, we were expecting either bash or zsh however we encountered $user_shell \033[0m"
return 1
fi
fi
system=`uname`
if [ "$system" = "Linux" ] ; then
echo -e "For jRuby (if you wish to use it) you will need:"
- if [ ! -z "`which apt-get`" ] ; then
+ if [ ! -z "`which apt-get 2>/dev/null`" ] ; then
echo -e " sudo apt-get install sun-java6-bin sun-java6-jre sun-java6-jdk "
- elif [ ! -z "`which emerge`" ] ; then
+ elif [ ! -z "`which emerge 2>/dev/null`" ] ; then
echo -e "emerge dev-java/sun-jdk dev-java/sun-jre-bin"
- elif [ ! -z "`which pacman`" ] ; then
+ elif [ ! -z "`which pacman 2>/dev/null`" ] ; then
echo -e "pacman -Sy jdk jre"
- elif [ ! -z "`which yum`" ] ; then
+ elif [ ! -z "`which yum 2>/dev/null`" ] ; then
echo -e "yum install -y rpm-build gcc gcc-c++ redhat-rpm-config ; then download and rpmbuild and install the sdk, Have fun..."
else
echo -e "The SUN java runtime environment and development kit."
fi
#elif [ "$sytem" = "Darwin" ] ; then
@@ -110,7 +110,7 @@
echo -e " For example: ruby-1.9.1-p243 -e 'puts \"hello world\"' #=> hello world"
echo -e "$info Contact wayneeseguin on irc.freenod.net in #rvm for any questions / feedback."
echo -e " I truly hope that you find rvm helpful! Thank you very much for using rvm. \n"
echo -e " ~ Wayne"
-echo -e "$info To start using rvm see: \e[0;32m rvm usage\e[0m, Now close this login shell and open a new one."
+echo -e "$info To start using rvm see: \033[0;32m rvm usage\033[0m, Now close this login shell and open a new one."