mirror of
https://github.com/pyenv/pyenv.git
synced 2024-11-21 20:47:00 -05:00
commit
a3deeba0a0
5 changed files with 20 additions and 8 deletions
|
@ -28,10 +28,22 @@ fi
|
||||||
export RBENV_ROOT
|
export RBENV_ROOT
|
||||||
|
|
||||||
|
|
||||||
export RBENV_PLUGIN_PATH="${RBENV_PLUGIN_PATH}:${RBENV_ROOT}/rbenv.d:/usr/local/etc/rbenv.d:/etc/rbenv.d"
|
shopt -s nullglob
|
||||||
|
|
||||||
|
bin_path="$(abs_dirname "$0")"
|
||||||
|
for plugin_bin in "${RBENV_ROOT}/plugins/"*/bin; do
|
||||||
|
bin_path="${bin_path}:${plugin_bin}"
|
||||||
|
done
|
||||||
|
export PATH="${bin_path}:${PATH}"
|
||||||
|
|
||||||
|
hook_path="${RBENV_HOOK_PATH}:${RBENV_ROOT}/rbenv.d:/usr/local/etc/rbenv.d:/etc/rbenv.d"
|
||||||
|
for plugin_hook in "${RBENV_ROOT}/plugins/"*/etc/rbenv.d; do
|
||||||
|
hook_path="${hook_path}:${plugin_hook}"
|
||||||
|
done
|
||||||
|
export RBENV_HOOK_PATH="$hook_path"
|
||||||
|
|
||||||
|
shopt -u nullglob
|
||||||
|
|
||||||
libexec_path="$(abs_dirname "$0")"
|
|
||||||
export PATH="${libexec_path}:${PATH}"
|
|
||||||
|
|
||||||
command="$1"
|
command="$1"
|
||||||
case "$command" in
|
case "$command" in
|
||||||
|
|
|
@ -16,7 +16,7 @@ fi
|
||||||
RBENV_COMMAND_PATH="$(rbenv-which "$RBENV_COMMAND")"
|
RBENV_COMMAND_PATH="$(rbenv-which "$RBENV_COMMAND")"
|
||||||
RBENV_BIN_PATH="${RBENV_COMMAND_PATH%/*}"
|
RBENV_BIN_PATH="${RBENV_COMMAND_PATH%/*}"
|
||||||
|
|
||||||
for script in $(rbenv-plugin-scripts exec); do
|
for script in $(rbenv-hooks exec); do
|
||||||
source "$script"
|
source "$script"
|
||||||
done
|
done
|
||||||
|
|
||||||
|
|
|
@ -12,7 +12,7 @@ fi
|
||||||
|
|
||||||
RBENV_COMMAND="$1"
|
RBENV_COMMAND="$1"
|
||||||
if [ -z "$RBENV_COMMAND" ]; then
|
if [ -z "$RBENV_COMMAND" ]; then
|
||||||
echo "usage: rbenv plugin-scripts COMMAND" >&2
|
echo "usage: rbenv hooks COMMAND" >&2
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
@ -36,7 +36,7 @@ realpath() {
|
||||||
}
|
}
|
||||||
|
|
||||||
shopt -s nullglob
|
shopt -s nullglob
|
||||||
for path in ${RBENV_PLUGIN_PATH//:/$'\n'}; do
|
for path in ${RBENV_HOOK_PATH//:/$'\n'}; do
|
||||||
for script in $path/"$RBENV_COMMAND"/*.bash; do
|
for script in $path/"$RBENV_COMMAND"/*.bash; do
|
||||||
echo $(realpath $script)
|
echo $(realpath $script)
|
||||||
done
|
done
|
|
@ -70,6 +70,6 @@ make_shims ../versions/*/bin/*
|
||||||
# Restore the previous working directory.
|
# Restore the previous working directory.
|
||||||
cd "$CUR_PATH"
|
cd "$CUR_PATH"
|
||||||
|
|
||||||
for script in $(rbenv-plugin-scripts rehash); do
|
for script in $(rbenv-hooks rehash); do
|
||||||
source "$script"
|
source "$script"
|
||||||
done
|
done
|
||||||
|
|
|
@ -52,7 +52,7 @@ else
|
||||||
RBENV_COMMAND_PATH="${RBENV_ROOT}/versions/${RBENV_VERSION}/bin/${RBENV_COMMAND}"
|
RBENV_COMMAND_PATH="${RBENV_ROOT}/versions/${RBENV_VERSION}/bin/${RBENV_COMMAND}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
for script in $(rbenv-plugin-scripts which); do
|
for script in $(rbenv-hooks which); do
|
||||||
source "$script"
|
source "$script"
|
||||||
done
|
done
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue