pyenv/libexec/rbenv-global
Alexander Rinass 5130f0464a Support install locations other than $HOME/.rbenv.
Define RBENV_HOME env variable in libexec/rbenv and let all script delegates use this variable to determine rbenv's install location.
2011-08-25 09:28:01 +02:00

13 lines
315 B
Bash
Executable file

#!/usr/bin/env bash
set -e
RBENV_VERSION="$1"
RBENV_VERSION_FILE="${RBENV_HOME}/global"
if [ -n "$RBENV_VERSION" ]; then
rbenv-version-file-write "$RBENV_VERSION_FILE" "$RBENV_VERSION"
else
rbenv-version-file-read "$RBENV_VERSION_FILE" ||
rbenv-version-file-read "${RBENV_HOME}/default" ||
echo system
fi