Sha256: b2e059716ff5f530ebd6e5ad4b05c0d35fb8c1433750e97cef5de364e6e3e1b9
Contents?: true
Size: 1.88 KB
Versions: 3
Compression:
Stored size: 1.88 KB
Contents
#!/usr/bin/env bash # # rvm : Ruby Version Manager # http://rvm.beginrescueend.com # http://gitub.com/wayneeseguin/rvm # if [[ -f "/etc/rvmrc" ]] ; then source "/etc/rvmrc" ; fi if [[ "root" = "$(whoami)" ]] ; then rvm_prefix_path="${rvm_prefix_path:-/usr/local/}" else if [[ -f "$HOME/.rvmrc" ]] ; then source "$HOME/.rvmrc" ; fi if [[ -f "$HOME/.rvm/scripts/rvm" ]] ; then rvm_prefix_path="${rvm_prefix_path:-"$HOME/."}" elif [[ -f "/usr/local/rvm/scripts/rvm" ]] ; then rvm_scripts_path="${rvm_scripts_path:-"/usr/local/rvm"}" rvm_prefix_path="${rvm_prefix_path:-"$HOME/."}" else echo -e "\nERROR: rvm scripts directory was not found in either ~/.rvm/ or /usr/local/rvm\n" if [[ $# -gt 0 ]] ; then exit 0 ; else return 1 ; fi fi fi if [[ "${rvm_prefix_path#${rvm_prefix_path%?}}" = '.' ]] || [[ "${rvm_prefix_path#${rvm_prefix_path%?}}" = '/' ]] ; then rvm_path="${rvm_prefix_path}rvm" else rvm_path="${rvm_prefix_path}/rvm" fi rvm_scripts_path="${rvm_scripts_path:-$rvm_path}" source $rvm_scripts_path/scripts/color source $rvm_scripts_path/scripts/utility source $rvm_scripts_path/scripts/selector source $rvm_scripts_path/scripts/ruby-installer # TODO: Script not function. source $rvm_scripts_path/scripts/cli source $rvm_scripts_path/scripts/gems rvm_loaded_flag=1 ; export rvm_loaded_flag rvm_version="$(cat "${rvm_path}/lib/VERSION.yml" | tail -n 3 | sed 's/^.*: //g' | tr "\n" '.' | sed 's/\.$//')" ; export rvm_version alias rvm-restart="source \"${rvm_path}/scripts/rvm\"" if [[ -f "$rvm_path/default" ]] ; then source "$rvm_path/default" ; fi # Ok now we determine if we were called or sourced... under assumption of course ;) if [[ $# -gt 0 ]] && [[ -z "$(echo "$*" | awk '/completion-/')" ]] ; then rvm "$*" ; fi # Source a .rvmrc file in a directory after changing to it, if it exists. cd() { builtin cd "$@" ; if [[ -f .rvmrc ]] ; then source .rvmrc ; fi ; }
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
rvm-0.0.80 | scripts/rvm |
rvm-0.0.79 | scripts/rvm |
rvm-0.0.78 | scripts/rvm |