Tools: Check if version exist before installing it

Signed-off-by: Patrick José Pereira <patrickelectric@gmail.com>
This commit is contained in:
Patrick José Pereira 2022-07-21 12:22:42 -03:00 committed by Peter Barker
parent 536db5d26f
commit 34be6fea77
1 changed files with 6 additions and 2 deletions

View File

@ -124,8 +124,12 @@ if maybe_prompt_user "Install python using pyenv [N/y]?" ; then
source ~/$SHELL_LOGIN
}
echo "pyenv installed"
env PYTHON_CONFIGURE_OPTS="--enable-framework" pyenv install 3.9.4
pyenv global 3.9.4
{
$(pyenv global 3.9.4)
} || {
env PYTHON_CONFIGURE_OPTS="--enable-framework" pyenv install 3.9.4
pyenv global 3.9.4
}
fi