Sha256: 5f181f5b26b8b44d6dcfb8f611305b6cf125f2bb32fe42be2aef74c029140dfa

Contents?: true

Size: 1.23 KB

Versions: 1

Compression:

Stored size: 1.23 KB

Contents

#!/usr/bin/env bash

if [[ ${rvm_ignore_rvmrc:-0} -eq 0 ]]; then

  for rvmrc in /etc/rvmrc "$HOME/.rvmrc" ; do

    if [[ -f "$rvmrc" ]] ; then

      if grep -q '^\s*rvm .*$' "$rvmrc" ; then

        printf "\n  Error:
    $rvmrc is for rvm settings only.
    rvm CLI may NOT be called from within $rvmrc.
    Skipping the loading of $rvmrc
"
        exit 1

      else

        source "$rvmrc"

      fi

    fi

  done

fi

# Setup default sandbox value. See scripts/rvm for origin.
if [[ ${rvm_selfcontained:-0} -eq 0 ]]; then

  if [[ $(id -u) -eq 0 || -n "$rvm_prefix" && "$rvm_prefix" != "$HOME"/* ]]; then

    rvm_selfcontained=0

  else

    rvm_selfcontained=1

  fi

fi

if [[ -z "${rvm_prefix:-""}" ]] ; then

  if [[ ${rvm_selfcontained:-0} -eq 0 ]] ; then

    rvm_prefix="/usr/local/"

  else

    rvm_prefix="$HOME/."

  fi

fi

# Fix rvm_prefix changes.
echo "$rvm_prefix" | grep -vq '\(\/\|\.\)$' && [[ -d "$rvm_prefix/rvm/scripts" ]]

rvm_prefix_needs_trailing_slash="$?"

if [[ "$rvm_prefix" = "/usr/local" || "$rvm_prefix_needs_trailing_slash" = "0" ]]; then
  rvm_prefix="$rvm_prefix/"
fi

if [[ -z "${rvm_path:-""}" ]] ; then
  rvm_path="${rvm_prefix}rvm"
fi

source "$rvm_path/scripts/rvm"

export rvm_interactive_flag=0

rvm "$@"

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
rvm-1.1.4 binscripts/rvm