scripts/rvm-install in rvm-0.1.44 vs scripts/rvm-install in rvm-0.1.45
- old
+ new
@@ -1,12 +1,12 @@
#!/usr/bin/env bash
-if [[ -z "$rvm_sandboxed" ]]; then
+if [[ -z "$rvm_selfcontained" ]]; then
if [[ "root" = "$(whoami)" ]] || [[ -n "$rvm_prefix" && "$rvm_prefix" != "$HOME"/* ]]; then
- export rvm_sandboxed=0
+ export rvm_selfcontained=0
else
- export rvm_sandboxed=1
+ export rvm_selfcontained=1
fi
fi
unset rvm_auto_flag
@@ -59,11 +59,11 @@
esac
done
if [[ -z "$rvm_prefix" ]] ; then
__rvm_load_rvmrc
- if [[ "$rvm_sandboxed" = "0" ]] ; then
+ if [[ "$rvm_selfcontained" = "0" ]] ; then
rvm_prefix="${rvm_prefix:-"/usr/local/"}"
else
rvm_prefix="${rvm_prefix:-"$HOME/."}"
fi
fi
@@ -93,14 +93,18 @@
source_path="${source_path:-$cwd}"
rvm_archives_path="${rvm_archives_path:-"$rvm_path/archives"}"
rvm_src_path="${rvm_src_path:-"$rvm_path/src"}"
rvm_log_path="${rvm_log_path:-"$rvm_path/log"}"
-if [[ -z "$rvm_prefix" ]] && [[ "root" = "$(whoami)" ]] ; then
- rvm_bin_path="${rvm_bin_path:-"/usr/local/bin"}"
+if [[ "$rvm_selfcontained" = "0" ]] ; then
+ rvm_bin_path="${rvm_bin_path:-"$rvm_prefix/bin"}"
+ rvm_man_path="${rvm_man_path:-"$rvm_prefix/share/man"}"
+ rvm_rc_files="${rvm_rc_files:-"/etc/profile /etc/zshenv"}"
else
+ rvm_man_path="${rvm_man_path:-"$rvm_path/man"}"
rvm_bin_path="${rvm_bin_path:-"$rvm_path/bin"}"
+ rvm_rc_files="${rvm_rc_files:-"$HOME/.bash_profile $HOME/.bashrc $HOME/.zshenv"}"
fi
rvm_gems_path="${rvm_gems_path:-"$rvm_path/gems"}"
rvm_rubies_path="${rvm_rubies_path:-"$rvm_path/rubies"}"
rvm_scripts_path="${rvm_scripts_path:-"$rvm_path/scripts"}"
@@ -319,23 +323,23 @@
printf "\n$(tput setaf 1)You must now finish the install manually:$(tput sgr0)"
printf "\n1) Place the folowing line at the end of your shell's loading files(.bashrc or .bash_profile for bash and .zshrc for zsh), after all path/variable settings:"
printf "\n [[ -s \$HOME/.rvm/scripts/rvm ]] && source \$HOME/.rvm/scripts/rvm"
printf "\n Please note that this must only occur once - so, you only need to add it the first time you install rvm."
printf "\n2) Ensure that there is no 'return' from inside the .bashrc file. (otherwise rvm will be prevented from working properly)."
- printf "\n This means that if you see '[ -z "\$PS1" ] && return' then you must change this line to:"
- printf "\n if [[ -n "\$PS1" ]] ; then"
+ printf "\n This means that if you see '[ -z \"\$PS1\" ] && return' then you must change this line to:"
+ printf "\n if [[ -n \"\$PS1\" ]] ; then"
printf "\n ... original content that was below the && return line ..."
printf "\n fi # <= be sure to close the if."
printf "\n #EOF .bashrc"
printf "\n Be absolutely *sure* to REMOVE the '&& return'."
printf "\n If you wish to DRY up your config you can 'source ~/.bashrc' at the bottom of your .bash_profile."
printf "\n placing all non-interactive items in the .bashrc, including the 'source' line above"
printf "\n3) Then $(tput setaf 1)CLOSE THIS SHELL$(tput sgr0) and open a new one in order to use rvm.\n"
fi
- if [[ -s $HOME/.bashrc ]] && grep -q '&& return' $HOME/.bashrc ; then
+ if [[ -s "$HOME/.bashrc" ]] && grep -q '&& return' "$HOME/.bashrc" ; then
printf "\n\nWARNING: you have a 'return' statement in your .bashrc, likely this will cause untold havoc."
- printf "\n This means that if you see '[ -z "\$PS1" ] && return' then you must change this line to:"
- printf "\n if [[ -n "\$PS1" ]] ; then"
+ printf "\n This means that if you see '[ -z \"\$PS1\" ] && return' then you must change this line to:"
+ printf "\n if [[ -n \"\$PS1\" ]] ; then"
printf "\n ... original content that was below the && return line ..."
printf "\n fi # <= be sure to close the if."
printf "\n #EOF .bashrc"
printf "\nEven if you use zsh you should still adjust the .bashrc as above."
printf "\nIf you have any questions about this please visit #rvm on irc.freenode.net.\n"