mirror of
https://github.com/pyenv/pyenv.git
synced 2024-11-21 20:47:00 -05:00
RBENV_HOME -> RBENV_ROOT
This commit is contained in:
parent
c6ce8fafd8
commit
7ac964353f
9 changed files with 14 additions and 14 deletions
|
@ -20,7 +20,7 @@ abs_dirname() {
|
||||||
}
|
}
|
||||||
|
|
||||||
rbenv_install_location=$(abs_dirname "$(dirname $0)")
|
rbenv_install_location=$(abs_dirname "$(dirname $0)")
|
||||||
export RBENV_HOME="${rbenv_install_location}"
|
export RBENV_ROOT="${rbenv_install_location}"
|
||||||
|
|
||||||
libexec_path="$(abs_dirname "$0")"
|
libexec_path="$(abs_dirname "$0")"
|
||||||
export PATH="${libexec_path}:${PATH}"
|
export PATH="${libexec_path}:${PATH}"
|
||||||
|
|
|
@ -8,6 +8,6 @@ if [ -n "$RBENV_VERSION" ]; then
|
||||||
rbenv-version-file-write "$RBENV_VERSION_FILE" "$RBENV_VERSION"
|
rbenv-version-file-write "$RBENV_VERSION_FILE" "$RBENV_VERSION"
|
||||||
else
|
else
|
||||||
rbenv-version-file-read "$RBENV_VERSION_FILE" ||
|
rbenv-version-file-read "$RBENV_VERSION_FILE" ||
|
||||||
rbenv-version-file-read "${RBENV_HOME}/default" ||
|
rbenv-version-file-read "${RBENV_ROOT}/default" ||
|
||||||
echo system
|
echo system
|
||||||
fi
|
fi
|
||||||
|
|
|
@ -55,9 +55,9 @@ if [ -z "$print" ]; then
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
mkdir -p "${RBENV_HOME}/"{shims,versions}
|
mkdir -p "${RBENV_ROOT}/"{shims,versions}
|
||||||
|
|
||||||
echo 'export PATH="'${RBENV_HOME}'/shims:${PATH}"'
|
echo 'export PATH="'${RBENV_ROOT}'/shims:${PATH}"'
|
||||||
|
|
||||||
case "$shell" in
|
case "$shell" in
|
||||||
bash | zsh )
|
bash | zsh )
|
||||||
|
|
|
@ -13,7 +13,7 @@ if [ "$RBENV_VERSION" = "system" ]; then
|
||||||
exit
|
exit
|
||||||
fi
|
fi
|
||||||
|
|
||||||
RBENV_PREFIX_PATH="${RBENV_HOME}/versions/${RBENV_VERSION}"
|
RBENV_PREFIX_PATH="${RBENV_ROOT}/versions/${RBENV_VERSION}"
|
||||||
if [ ! -d "$RBENV_PREFIX_PATH" ]; then
|
if [ ! -d "$RBENV_PREFIX_PATH" ]; then
|
||||||
echo "rbenv: version \`${RBENV_VERSION}' not installed" >&2
|
echo "rbenv: version \`${RBENV_VERSION}' not installed" >&2
|
||||||
exit 1
|
exit 1
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
SHIM_PATH="${RBENV_HOME}/shims"
|
SHIM_PATH="${RBENV_ROOT}/shims"
|
||||||
PROTOTYPE_SHIM_PATH="${SHIM_PATH}/.rbenv-shim"
|
PROTOTYPE_SHIM_PATH="${SHIM_PATH}/.rbenv-shim"
|
||||||
|
|
||||||
# Create the shims directory if it doesn't already exist.
|
# Create the shims directory if it doesn't already exist.
|
||||||
|
@ -63,7 +63,7 @@ shopt -s nullglob
|
||||||
make_shims ../versions/*/bin/*
|
make_shims ../versions/*/bin/*
|
||||||
|
|
||||||
# Find and run any plugins that might want to make shims too.
|
# Find and run any plugins that might want to make shims too.
|
||||||
RBENV_REHASH_PLUGINS=(/etc/rbenv.d/rehash/*.bash ${RBENV_HOME}/rbenv.d/rehash/*.bash)
|
RBENV_REHASH_PLUGINS=(/etc/rbenv.d/rehash/*.bash ${RBENV_ROOT}/rbenv.d/rehash/*.bash)
|
||||||
shopt -u nullglob
|
shopt -u nullglob
|
||||||
|
|
||||||
for script in ${RBENV_REHASH_PLUGINS[@]}; do
|
for script in ${RBENV_REHASH_PLUGINS[@]}; do
|
||||||
|
|
|
@ -10,8 +10,8 @@ while [ -n "$root" ]; do
|
||||||
root="${root%/*}"
|
root="${root%/*}"
|
||||||
done
|
done
|
||||||
|
|
||||||
GLOBAL_PATH="${RBENV_HOME}/global"
|
GLOBAL_PATH="${RBENV_ROOT}/global"
|
||||||
DEFAULT_PATH="${RBENV_HOME}/default"
|
DEFAULT_PATH="${RBENV_ROOT}/default"
|
||||||
|
|
||||||
if [ -e "$GLOBAL_PATH" ]; then
|
if [ -e "$GLOBAL_PATH" ]; then
|
||||||
echo "$GLOBAL_PATH"
|
echo "$GLOBAL_PATH"
|
||||||
|
|
|
@ -11,7 +11,7 @@ if [ -z "$RBENV_VERSION" ] || [ "$RBENV_VERSION" = "system" ]; then
|
||||||
exit
|
exit
|
||||||
fi
|
fi
|
||||||
|
|
||||||
RBENV_VERSION_PATH="${RBENV_HOME}/versions/${RBENV_VERSION}"
|
RBENV_VERSION_PATH="${RBENV_ROOT}/versions/${RBENV_VERSION}"
|
||||||
|
|
||||||
if [ -d "$RBENV_VERSION_PATH" ]; then
|
if [ -d "$RBENV_VERSION_PATH" ]; then
|
||||||
echo "$RBENV_VERSION"
|
echo "$RBENV_VERSION"
|
||||||
|
|
|
@ -13,7 +13,7 @@ else
|
||||||
print_version="$(rbenv-version)"
|
print_version="$(rbenv-version)"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
for path in "${RBENV_HOME}/versions/"*; do
|
for path in "${RBENV_ROOT}/versions/"*; do
|
||||||
if [ -d "$path" ]; then
|
if [ -d "$path" ]; then
|
||||||
version="${path##*/}"
|
version="${path##*/}"
|
||||||
|
|
||||||
|
|
|
@ -35,14 +35,14 @@ RBENV_VERSION="$(rbenv-version-name)"
|
||||||
RBENV_COMMAND="$1"
|
RBENV_COMMAND="$1"
|
||||||
|
|
||||||
if [ "$RBENV_VERSION" = "system" ]; then
|
if [ "$RBENV_VERSION" = "system" ]; then
|
||||||
PATH="$(remove_from_path "${RBENV_HOME}/shims")"
|
PATH="$(remove_from_path "${RBENV_ROOT}/shims")"
|
||||||
RBENV_COMMAND_PATH="$(command -v "$RBENV_COMMAND")"
|
RBENV_COMMAND_PATH="$(command -v "$RBENV_COMMAND")"
|
||||||
else
|
else
|
||||||
RBENV_COMMAND_PATH="${RBENV_HOME}/versions/${RBENV_VERSION}/bin/${RBENV_COMMAND}"
|
RBENV_COMMAND_PATH="${RBENV_ROOT}/versions/${RBENV_VERSION}/bin/${RBENV_COMMAND}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
shopt -s nullglob
|
shopt -s nullglob
|
||||||
RBENV_WHICH_PLUGINS=(/etc/rbenv.d/which/*.bash ${RBENV_HOME}/rbenv.d/which/*.bash)
|
RBENV_WHICH_PLUGINS=(/etc/rbenv.d/which/*.bash ${RBENV_ROOT}/rbenv.d/which/*.bash)
|
||||||
shopt -u nullglob
|
shopt -u nullglob
|
||||||
|
|
||||||
for script in ${RBENV_WHICH_PLUGINS[@]}; do
|
for script in ${RBENV_WHICH_PLUGINS[@]}; do
|
||||||
|
|
Loading…
Reference in a new issue