scripts/rvm-install in rvm-0.1.18 vs scripts/rvm-install in rvm-0.1.19

- old
+ new

@@ -33,21 +33,21 @@ --version) rvm_path="$(pwd)" ; __rvm_version ; unset rvm_path ; exit ;; --help|*) usage ;; esac done -__rvm_load_rvmrc - -if [[ -z "$rvm_path" ]] ; then - unset rvm_path +if [[ -z "$rvm_prefix" ]] ; then + __rvm_load_rvmrc if [[ "root" = "$(whoami)" ]] ; then - rvm_path="/usr/local/rvm" + rvm_prefix="/usr/local/" else - rvm_path="$HOME/.rvm" + rvm_prefix="$HOME/." fi fi +if [[ -z "$rvm_path" ]] ; then rvm_path="${rvm_prefix}rvm" ; fi + source scripts/initialize __rvm_initialize # # Setup @@ -67,11 +67,11 @@ rvm_rubies_path="${rvm_rubies_path:-"$rvm_path/rubies"}" rvm_scripts_path="${rvm_scripts_path:-"$rvm_path/scripts"}" rvm_config_path="${rvm_config_path:-"$rvm_path/config"}" rvm_hooks_path="${rvm_hooks_path:-"$rvm_path/hooks"}" rvm_tmp_path="${rvm_tmp_path:-"$rvm_path/tmp"}" -rvm_symlink_path="${rvm_symlink_path:-/usr/local/bin}" +rvm_symlink_path="${rvm_symlink_path:-$rvm_prefix/bin}" mkdir -p $rvm_archives_path $rvm_src_path $rvm_log_path $rvm_bin_path $rvm_gems_path $rvm_rubies_path $rvm_config_path $rvm_hooks_path $rvm_tmp_path $rvm_symlink_path $HOME/.gem/cache for file in README LICENCE ; do cp -f "$source_path/$file" "$rvm_path/" @@ -90,10 +90,15 @@ if [[ ! -s "$rvm_config_path/user" ]] ; then mkdir -p "$rvm_config_path/" echo '# Users settings file, overrides db file settings and persists across installs.' >> $rvm_config_path/user fi +scripts="monitor match log install color db fetch log set libraries" +for script_name in $(echo $scripts) ; do + chmod +x $rvm_scripts_path/$script_name +done + # # Bin Scripts # # Cleanse and purge... for file in rvm-prompt rvm rvmsudo ; do @@ -165,25 +170,27 @@ echo -e "\n${name:-"$(whoami)"},\n" echo -e "\nThank you for using rvm. I hope that it makes your work easier and more enjoyable." echo -e "If you have any questions, issues and/or ideas for improvement please hop in #rvm on irc.freenode.net and let me know." echo -e "My irc nickname is 'wayneeseguin' and I hang out from ~09:00-17:00EST and again from ~21:00EST-~00:00EST." echo -e "If I do not respond right away, please hang around after asking your question, I will respond as soon as I am back." +echo -e "Be sure to get head often as rvm development happens fast, you can do this by typing 'rvm update --head'." echo -e "\n w$(tput setaf 2)⦿‿⦿$(tput sgr0)t!" echo -e "\n ~ Wayne" echo -e "\n********************************************************************************" if [[ "root" != "$(whoami)" ]] ; then echo -e "\n$(tput setaf 1)You must now finish the install manually:$(tput sgr0)" echo -e "\n1) Place the folowing line at the end of your shell's loading files(.bashrc and then .bash_profile for bash and .zshrc for zsh), after all path/variable settings:" echo -e "\n if [[ -s $rvm_path/scripts/rvm ]] ; then source $rvm_path/scripts/rvm ; fi" echo -e "\n2) Ensure that there is no 'return' from inside the .bashrc file. (otherwise rvm will be prevented from working properly)." - echo -e "\n This means that if you see '[ -z "$PS1" ] && return' then you must split your .bashrc" + echo -e "\n This means that if you see '[ -z "$PS1" ] && return' then you must remove it and split your .bashrc" echo -e "\n Put everything *except the return code line(s)* into your .bash_profile, and everything above that code in your .bashrc." + echo -e "\n Be *sure* to REMOVE the '&& return' statement line." echo -e "\n If you wish to DRY up your config you can 'source ~/.bashrc' at the top of your .bash_profile." echo -e "\n4) Then $(tput setaf 1)CLOSE THIS SHELL$(tput sgr0) and open a new one in order to use rvm.\n" fi -if grep '&& return' ~/.bashrc ; then +if [[ -s $HOME/.bashrc ]] && grep '&& return' $HOME/.bashrc ; then echo -e "\n\nWARNING: you have a 'return' statement in your .bashrc, likely this will cause untold havoc. Please remove it and refactor your profiles to be correct. If you have questions about this please visit #rvm on irc.freenode.net.\n\n" fi exit 0