scripts/rvm-install in wayneeseguin-rvm-0.0.36 vs scripts/rvm-install in wayneeseguin-rvm-0.0.37
- old
+ new
@@ -12,11 +12,11 @@
source_dir="${source_dir:-`dirname $0 | xargs dirname`}"
if [ ! -d "$source_dir" ] ; then unset source_dir ; fi
source_dir="${source_dir:-$cwd}"
rvm_dir=~/.rvm
-echo -e "Installing rvm source to ~/.rvm/scripts/rvm..."
+echo -e "\nInstalling rvm source to ~/.rvm/scripts/rvm..."
for dir in src scripts bin log archives config gems examples ; do
mkdir -p $rvm_dir/$dir
done
# State what is required to use rvm
@@ -58,25 +58,28 @@
if [ "$user_shell" = "bash" -o "$user_shell" = "both" ] ; then
touch ~/.bash_profile
if [ -z "`grep '\.rvm/scripts/rvm' ~/.bash_profile`" ] ; then
echo "Adding 'if [ -s ~/.rvm/scripts/rvm ] ; then source ~/.rvm/scripts/rvm ; fi' to your ~/.bash_profile."
+ echo -e "\n" >> ~/.bash_profile
echo "if [ -s ~/.rvm/scripts/rvm ] ; then source ~/.rvm/scripts/rvm ; fi" >> ~/.bash_profile
fi
touch ~/.bashrc
if [ -z "`grep '\.rvm/scripts/rvm' ~/.bashrc`" ] ; then
echo "Adding 'if [ -s ~/.rvm/scripts/rvm ] ; then source ~/.rvm/scripts/rvm ; fi' to your ~/.bashrc."
+ echo -e "\n" >> ~/.bashrc
echo "if [ -s ~/.rvm/scripts/rvm ] ; then source ~/.rvm/scripts/rvm ; fi" >> ~/.bashrc
fi
fi
if [ "$user_shell" = "zsh" -o "$user_shell" = "both" ] ; then
touch ~/.zshrc
if [ -z "`grep '\.rvm/scripts/rvm' ~/.zshrc`" ] ; then
echo "Adding 'if [ -s ~/.rvm/scripts/rvm ] ; then source ~/.rvm/scripts/rvm ; fi' to your ~/.zshrc."
+ echo -e "\n" >> ~/.zshrc
echo "if [ -s ~/.rvm/scripts/rvm ] ; then source ~/.rvm/scripts/rvm ; fi" >> ~/.zshrc
fi
fi
fi
@@ -89,10 +92,19 @@
actual_file=`readlink $file` # read the link target so we can preserve it.
else
actual_file="$file"
fi
sed -i.orig 's/rvm\/bin\/rvm/rvm\/scripts\/rvm/g' $actual_file
+
+ if [ -f ~/.profile ] ; then
+ grep '.profile' $actual_file > /dev/null
+ if [ $? -gt 0 ] ; then
+ profile=~/.profile
+ echo -e "\n" >> $actual_file
+ echo "source $profile" >> $actual_file
+ fi
+ fi
fi
done
if [ -f ~/.rvm/bin/rvm ] ; then
echo -e "\n\033[0;32m<i>\033[0m Removing old rvm file from ~/.rvm/bin/rvm"
@@ -111,38 +123,47 @@
rvm_apt_get_binary=`which apt-get 2> /dev/null`
rvm_emerge_binary=`which emerge 2> /dev/null`
rvm_pacman_binary=`which pacman 2> /dev/null`
rvm_yum_binary=`which yum 2> /dev/null`
- echo -e "\033[0;33m <w> \033[0mFor jRuby & ree (if you wish to use it) you will need:"
if [ ! -z "$rvm_apt_get_binary" ] ; then
- echo -e "\033[0;32m <i> \033[0msudo apt-get install sun-java6-bin sun-java6-jre sun-java6-jdk libreadline5-dev libssl-dev "
+ echo -e "\033[0;33m <w> \033[0mFor jRuby (if you wish to use it) you will need:"
+ echo -e "\033[0;32m <i> \033[0msudo apt-get install sun-java6-bin sun-java6-jre sun-java6-jdk"
+ echo -e "\033[0;33m <w> \033[0mFor ree (if you wish to use it) you will need:"
+ echo -e "\033[0;32m <i> \033[0msudo apt-get install libreadline5-dev libssl-dev "
elif [ ! -z "$rvm_emerge_binary" ] ; then
+ echo -e "\033[0;33m <w> \033[0mFor jRuby (if you wish to use it) you will need:"
echo -e "\033[0;32m <i> \033[0msudo emerge dev-java/sun-jdk dev-java/sun-jre-bin"
elif [ ! -z "$rvm_pacman_binary" ] ; then
+ echo -e "\033[0;33m <w> \033[0mFor jRuby (if you wish to use it) you will need:"
echo -e "\033[0;32m <i> \033[0msudo pacman -Sy jdk jre"
elif [ ! -z "$rvm_yum_binary" ] ; then
+ echo -e "\033[0;33m <w> \033[0mFor ree (if you wish to use it) you will need:"
echo -e "\033[0;32m <i> \033[0myum install -y rpm-build gcc gcc-c++ redhat-rpm-config ; then download and rpmbuild and install the sdk, Have fun..."
else
+ echo -e "\033[0;33m <w> \033[0mFor jRuby (if you wish to use it) you will need:"
echo -e "\033[0;32m <i> \033[0mThe SUN java runtime environment and development kit."
fi
elif [ "$sytem" = "Darwin" ] ; then
+ echo -e "\033[0;32m <i> \033[0mBe sure that you have XCode Tools installed in order to use rvm."
echo -e "\033[0;32m <i> \033[0mIf you intend on installing MacRuby you must install LLVM first."
fi
echo -e "$info There have been a great many updates since previous releases, please:"
echo -e "$info * remove sourcing of ~/.rvm/current from your shell profiles."
-echo -e "$info * note that ruby gems are now all installed into ~/.rvm/gems"
+echo -e "$info * CLOSE THIS SHELL AND OPEN A NEW ONE FOR rvm."
echo -e "\n$info Please visit the website for much more information: http://rvm.beginrescueend.com/\n"
echo ' w⦿‿⦿t! '
echo -e "\n ~ Wayne"
source $rvm_dir/scripts/rvm
+
rvm symlinks
echo
rvm -v
+echo