Files
dotfiles/install/10-pyenv.sh
2020-07-12 22:33:50 +01:00

25 lines
680 B
Bash
Executable File

#!/usr/bin/env bash
source "$(dirname $0)/utils.sh"
# pyenv is installed
if not_installed "pyenv"; then
echo "Installing pyenv..."
# Install pyenv prerequisites
# see https://github.com/pyenv/pyenv/wiki/common-build-problems
pyenv_list_file="$install_dir/10-pyenv-pkglist"
install_file "$pyenv_list_file"
# Install pyenv
# see https://github.com/pyenv/pyenv-installer
run "https://github.com/pyenv/pyenv-installer/raw/master/bin/pyenv-installer" \
"bash"
fi
echo "pyenv is installed, upgrading $PYENV_ROOT..."
git --git-dir="$PYENV_ROOT/.git" fetch -q
git --git-dir="$PYENV_ROOT/.git" rebase -q --autostash FETCH_HEAD
pyenv --version