install in rvm-0.0.97 vs install in rvm-0.0.98
- old
+ new
@@ -1,19 +1,20 @@
#!/usr/bin/env bash
if [[ -f /etc/rvmrc ]] ; then source /etc/rvmrc ; fi
if [[ -f "$HOME/.rvmrc" ]] ; then source "$HOME/.rvmrc" ; fi
-if [[ ! -d "$rvm_path" ]] || [[ "$rvm_path" = "/" ]] ; then
+if ! [[ "$rvm_path" =~ /rvm/?$ ]] ; then
unset rvm_path
if [[ "root" = "$(whoami)" ]] ; then
rvm_path="/usr/local/rvm"
else
rvm_path="$HOME/.rvm"
fi
fi
+source scripts/utility
source scripts/initialize
#
# Setup
#
@@ -52,11 +53,11 @@
# Bin Scripts
#
echo -e "\n Installing bin scripts to $rvm_path/bin ..."
# Cleanse and purge...
rm -f $rvm_path/bin/rvm ; rm -rf $rvm_path/bin/binscripts
-for file in rvm-prompt rvm ; do
+for file in rvm-prompt rvm rvmsudo ; do
cp -f "$source_dir/binscripts/$file" $rvm_path/bin/
done
chmod +x $rvm_path/bin/*
#
@@ -66,11 +67,11 @@
if [[ "$rvm_loaded_flag" != "1" ]] ; then
for rcfile in $(echo $rvm_rc_files) ; do
if [[ ! -f $rcfile ]] ; then touch $rcfile ; fi
if [[ -s "$HOME/.profile" ]] ; then
if ! grep -q '.profile' "$rcfile" ; then
- echo " Adding 'if [[ -s $HOME/.profile ]] ; then source $HOME ; fi' to $rcfile."
+ echo " Adding 'if [[ -s \$HOME/.profile ]] ; then source \$HOME ; fi' to $rcfile."
echo -e "\n# rvm-install added line:\nif [[ -s \$HOME/.profile ]] ; then source \$HOME/.profile ; fi\n" >> $rcfile
fi
fi
if ! grep -q "scripts\/rvm" "$rcfile" ; then
echo " Adding 'if [[ -s $rvm_path/scripts/rvm ]] ; then source $rvm_path/scripts/rvm ; fi' to $rcfile."
@@ -79,9 +80,10 @@
done
fi
if [[ "root" = "$(whoami)" ]] ; then
echo -e "\n Symlinking rvm to $rvm_symlink_path/rvm ..."
+ mkdir -p $rvm_symlink_path
ln -nfs $rvm_path/bin/rvm $rvm_symlink_path/rvm
chmod +x $rvm_symlink_path/rvm
fi
#