Permalink
Browse files

Provide more information during the installation.

  • Loading branch information...
1 parent eddda0d commit 6032384c72b6fbcf1d5f60980b80011152b59ba5 @wayneeseguin wayneeseguin committed Dec 2, 2009
Showing with 7 additions and 4 deletions.
  1. +7 −4 scripts/install
View
@@ -26,7 +26,7 @@ source_dir="${source_dir:-$cwd}"
# State what is required to use rvm
echo -e "\n$(tput setaf 2)rvm$(tput sgr0) - shell scripts that allows a user to manage multiple ruby versions in their own account."
-echo -e "\n Installing to $rvm_path..."
+echo -e "\n Prepairing $rvm_path ..."
for dir_name in src scripts bin log archives config gems examples ; do
mkdir -p "$rvm_path/$dir_name"
done
@@ -35,6 +35,7 @@ cp -f "$source_dir/README" "$rvm_path/"
#
# Scripts
#
+echo -e "\n Installing rvm to $rvm_path/ ..."
rm -rf $rvm_path/scripts # Clear the old scripts directory so that the old style rvm- scripts are cleared out.
for dir_name in config scripts examples lib hooks ; do
mkdir -p "$rvm_path/$dir_name"
@@ -46,28 +47,30 @@ done ; unset dir_name
#
# Bin Scripts
#
+echo -e "\n Installing bin scripts to $rvm_path/bin ..."
cp -Rf "$source_dir/binscripts/" $rvm_path/bin
chmod +x $rvm_path/bin/*
ln -nfs $rvm_path/scripts/rvm $rvm_path/bin/rvm
#
# RC Files
#
+echo -e "\n Checking rc files ($rvm_rc_files) ..."
if [[ "$rvm_loaded_flag" != "1" ]] ; then
for rcfile in $(echo $rvm_rc_files) ; do
if [[ ! -f $rcfile ]] ; then touch $rcfile ; fi
- if [[ -z "$(awk "/scripts\/rvm/" $rcfile)" ]] ; then
+ if ! awk "/scripts\/rvm/" "$rcfile" ; then
echo " Adding 'if [[ -s $rvm_path/scripts/rvm ]] ; then source $rvm_path/scripts/rvm ; fi' to $rcfile."
echo -e "\n# rvm-install added line:\nif [[ -s $rvm_path/scripts/rvm ]] ; then source $rvm_path/scripts/rvm ; fi\n" >> $rcfile
- else
- : # it exists... remove it and append at the end
fi
done
fi
if [[ "root" = "$(whoami)" ]] ; then
+ echo -e "\n Symlinking rvm to $rvm_symlink_path/rvm ..."
ln -nfs $rvm_path/scripts/rvm $rvm_symlink_path/rvm
else
+ echo -e "\n Symlinking rvm to $rvm_path/bin/rvm ..."
ln -nfs $rvm_path/scripts/rvm $rvm_path/bin/rvm
fi
chmod +x $rvm_path/scripts/rvm

0 comments on commit 6032384

Please sign in to comment.