Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

executable file 133 lines (108 sloc) 3.226 kB
#!/usr/bin/env bash
if ! typeset -f rvm_pretty_print >/dev/null 2>&1
then source "${rvm_scripts_path:-"$rvm_path/scripts"}/functions/logging"
fi
if [[ "$1" == "initial" ]]
then
notes_type=Upgrade
PAGER=cat
new_notes()
{
typeset file
file="$rvm_path/config/displayed-notes.txt"
rm -f "${file}"
tee "${file}" > /dev/null
}
elif [[ "$1" == "upgrade" ]]
then
notes_type=Upgrade
PAGER=cat
new_notes()
{
typeset file
file="$rvm_path/config/displayed-notes.txt"
touch "${file}"
tee "${file}.new" | (
diff --normal - "${file}" && \
printf " * No new notes to display.\n" >&2 || true
) | sed '/^[^<]/ d ; s/^< //'
mv -f "${file}.new" "${file}"
}
else
notes_type=Installation
new_notes()
{
cat
}
fi
if [[ "$1" == "upgrade" ]]
then
printf "%b" "
$notes_type Notes:
"
fi
# this block groups generated and static notes,
# to add generated msgs put them bellow in code
# for general messages put them in help/upgrade-notes.txt
{
if [[ -z "$1" ]]
then
printf "%b" "
$notes_type Notes:
"
fi
if [[ "$rvm_path" == "/usr/local/rvm" ]] || (( UID == 0 ))
then
printf "%b" "
* Please do NOT forget to add your users to the 'rvm' group.
The installer no longer auto-adds root or users to the rvm group. Admins must do this.
Also, please note that group memberships are ONLY evaluated at login time.
This means that users must log out then back in before group membership takes effect!
"
fi
: \
rvm_scripts_path:${rvm_scripts_path:-$rvm_path/scripts}:
cat "$rvm_path/help/upgrade-notes.txt" | sed \
-e "s/\${SHELL}/${SHELL//\//\/}/g" \
-e "s/\${rvm_scripts_path}/${rvm_scripts_path//\//\/}/g"
printf "\n"
if [[ -f /etc/profile.d/rvm.sh ]] &&
! grep rvm_stored_umask /etc/profile.d/rvm.sh >/dev/null
then
printf "%b" "
* WARNING: your RVM loading script \`/etc/profile.d/rvm.sh\` is deprecated
and causes you to have \`umask g+w\` set in your shell,
run \`rvm get head --auto\` again to fix your scripts.
"
fi
if [[ "$rvm_path" == "/usr/share/ruby-rvm" ]]
then
printf "%b" "
* WARNING: You are using apt-get broken RVM, you should now:
sudo apt-get --purge remove ruby-rvm
sudo rm -rf /usr/share/ruby-rvm /etc/rvmrc /etc/profile.d/rvm.sh
open new terminal and validate environment is clean from old rvm settings:
env | grep rvm
install RVM:
bash -s stable < <(curl -s https://raw.github.com/wayneeseguin/rvm/master/binscripts/rvm-installer)
"
fi
if [[ -n "${RUBYOPT:-""}" ]]
then
printf "%b" "
* WARNING: You have RUBYOPT set in your current environment.
This may cause rubies to not work as you expect them to as it is not supported
by all of them If errors show up, please try unsetting RUBYOPT first.
"
fi
} | new_notes | "${PAGER:-cat}"
printf "%b" \
"
# RVM: Shell scripts enabling management of multiple ruby environments.
# RTFM: https://rvm.beginrescueend.com/
# HELP: http://webchat.freenode.net/?channels=rvm (#rvm on irc.freenode.net)
# Screencast: http://screencasts.org/episodes/how-to-use-rvm
"
rvm_log "
# In case of any issues read output of 'rvm requirements' and/or 'rvm notes'
"
Jump to Line
Something went wrong with that request. Please try again.