mirror of
https://github.com/pyenv/pyenv.git
synced 2024-11-21 20:47:00 -05:00
Use plugin-scripts
This commit is contained in:
parent
789ace54ec
commit
96b98ed039
3 changed files with 6 additions and 18 deletions
|
@ -16,12 +16,8 @@ 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%/*}"
|
||||||
|
|
||||||
shopt -s nullglob
|
for script in $(rbenv-plugin-scripts exec); do
|
||||||
RBENV_EXEC_PLUGINS=(/etc/rbenv.d/exec/*.bash ${RBENV_ROOT}/rbenv.d/exec/*.bash)
|
source $script;
|
||||||
shopt -u nullglob
|
|
||||||
|
|
||||||
for script in ${RBENV_EXEC_PLUGINS[@]}; do
|
|
||||||
source $script
|
|
||||||
done
|
done
|
||||||
|
|
||||||
shift 1
|
shift 1
|
||||||
|
|
|
@ -67,13 +67,9 @@ create_prototype_shim
|
||||||
shopt -s nullglob
|
shopt -s nullglob
|
||||||
make_shims ../versions/*/bin/*
|
make_shims ../versions/*/bin/*
|
||||||
|
|
||||||
# Find and run any plugins that might want to make shims too.
|
|
||||||
RBENV_REHASH_PLUGINS=(/etc/rbenv.d/rehash/*.bash ${RBENV_ROOT}/rbenv.d/rehash/*.bash)
|
|
||||||
shopt -u nullglob
|
|
||||||
|
|
||||||
# Restore the previous working directory.
|
# Restore the previous working directory.
|
||||||
cd "$CUR_PATH"
|
cd "$CUR_PATH"
|
||||||
|
|
||||||
for script in ${RBENV_REHASH_PLUGINS[@]}; do
|
for script in $(rbenv-plugin-scripts rehash); do
|
||||||
source $script
|
source $script;
|
||||||
done
|
done
|
||||||
|
|
|
@ -52,12 +52,8 @@ 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
|
||||||
|
|
||||||
shopt -s nullglob
|
for script in $(rbenv-plugin-scripts which); do
|
||||||
RBENV_WHICH_PLUGINS=(/etc/rbenv.d/which/*.bash ${RBENV_ROOT}/rbenv.d/which/*.bash)
|
source $script;
|
||||||
shopt -u nullglob
|
|
||||||
|
|
||||||
for script in ${RBENV_WHICH_PLUGINS[@]}; do
|
|
||||||
source $script
|
|
||||||
done
|
done
|
||||||
|
|
||||||
if [ -x "$RBENV_COMMAND_PATH" ]; then
|
if [ -x "$RBENV_COMMAND_PATH" ]; then
|
||||||
|
|
Loading…
Reference in a new issue