mirror of
https://github.com/pyenv/pyenv.git
synced 2024-11-14 20:39:55 -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_BIN_PATH="${RBENV_COMMAND_PATH%/*}"
|
||||
|
||||
shopt -s nullglob
|
||||
RBENV_EXEC_PLUGINS=(/etc/rbenv.d/exec/*.bash ${RBENV_ROOT}/rbenv.d/exec/*.bash)
|
||||
shopt -u nullglob
|
||||
|
||||
for script in ${RBENV_EXEC_PLUGINS[@]}; do
|
||||
source $script
|
||||
for script in $(rbenv-plugin-scripts exec); do
|
||||
source $script;
|
||||
done
|
||||
|
||||
shift 1
|
||||
|
|
|
@ -67,13 +67,9 @@ create_prototype_shim
|
|||
shopt -s nullglob
|
||||
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.
|
||||
cd "$CUR_PATH"
|
||||
|
||||
for script in ${RBENV_REHASH_PLUGINS[@]}; do
|
||||
source $script
|
||||
for script in $(rbenv-plugin-scripts rehash); do
|
||||
source $script;
|
||||
done
|
||||
|
|
|
@ -52,12 +52,8 @@ else
|
|||
RBENV_COMMAND_PATH="${RBENV_ROOT}/versions/${RBENV_VERSION}/bin/${RBENV_COMMAND}"
|
||||
fi
|
||||
|
||||
shopt -s nullglob
|
||||
RBENV_WHICH_PLUGINS=(/etc/rbenv.d/which/*.bash ${RBENV_ROOT}/rbenv.d/which/*.bash)
|
||||
shopt -u nullglob
|
||||
|
||||
for script in ${RBENV_WHICH_PLUGINS[@]}; do
|
||||
source $script
|
||||
for script in $(rbenv-plugin-scripts which); do
|
||||
source $script;
|
||||
done
|
||||
|
||||
if [ -x "$RBENV_COMMAND_PATH" ]; then
|
||||
|
|
Loading…
Reference in a new issue