scripts/rvm-install in rvm-0.0.81 vs scripts/rvm-install in rvm-0.0.82

- old
+ new

@@ -34,39 +34,43 @@ # # Scripts # 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 ; do +for dir_name in config scripts examples lib hooks ; do mkdir -p "$rvm_path/$dir_name" cp -Rf "$source_dir/$dir_name" "$rvm_path" done ; unset dir_name # # Bin Scripts # -cp -Rf "$source_dir/binscripts" $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 # -for rcfile in $(echo $rvm_rc_files) ; do - if [[ ! -f $rcfile ]] ; then touch $rcfile ; fi - if [[ -z "$(awk "/$(echo "$rvm_path/scripts/rvm" | sed 's#/#\\/#g')/" $rcfile)" ]] ; then - echo " Adding 'if [[ -s $rvm_path/scripts/rvm ]] && [[ "\$rvm_loaded_flag" -le 0 ]] ; then source $rvm_path/scripts/rvm ; fi' to $rcfile." - echo -e "\n# rvm-install added line:\nif [[ -s $rvm_path/scripts/rvm ]] && [[ "\$rvm_loaded_flag" != "1" ]] ; then source $rvm_path/scripts/rvm ; fi\n" >> $rcfile - else - : # it exists... remove it and append at the end - fi -done +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 + 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 ln -nfs $rvm_path/scripts/rvm /usr/local/bin/rvm - chmod +x /usr/local/bin/rvm +else + ln -nfs $rvm_path/scripts/rvm $rvm_path/bin/rvm fi +chmod +x $rvm_path/scripts/rvm # # System Checks # system="$(uname)" @@ -100,11 +104,12 @@ else echo -e " $item For JRuby (if you wish to use it) you will need:" echo -e " The SUN java runtime environment and development kit." fi elif [[ "Darwin" = "$system" ]] ; then - echo -e " $item Be sure that you have XCode Tools installed in order to use rvm." + echo -e " $item Be sure that you have XCode Tools (Version 3.2.1 (1613) or later) installed in order to use rvm." + echo -e " $item You can download the latest XCode tools from developer.apple.com. This will be necessary with the dvd install for Snow Leopard which has bugs." echo -e " $item If you intend on installing MacRuby you must install LLVM first." fi echo -e " $item In order to use rvm the following line must occur in your shell's loading files, after all path/variable settings.:" echo -e " $item if [[ -s $rvm_path/scripts/rvm ]] ; then source $rvm_path/scripts/rvm ; fi" @@ -112,8 +117,8 @@ echo -e "\n$(tput setaf 2)RTFM:\n $(tput sgr0) http://rvm.beginrescueend.com/ \n" echo -e "$(tput setaf 2)w⦿‿⦿t!$(tput sgr0)" echo -e "\n ~ Wayne\n" -$rvm_path/bin/rvm -v +$cwd/scripts/rvm -v exit 0