-
-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathsetup-pyenv
executable file
·32 lines (26 loc) · 878 Bytes
/
setup-pyenv
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#!/usr/bin/env bash
set -euo pipefail
# install/update pyenv
# https://github.com/yyuu/pyenv
_pyenv_dir="${HOME}/.pyenv"
if [[ -d "${_pyenv_dir}" ]]; then
echo "pyenv is already installed!"
echo "Updating pyenv..."
cd "${_pyenv_dir}"
git pull
else
echo "Installing pyenv..."
git clone https://github.com/yyuu/pyenv "${_pyenv_dir}"
fi
_pyenv_virtualenv_dir="${_pyenv_dir}/plugins/pyenv-virtualenv"
if [[ -d "${_pyenv_virtualenv_dir}" ]]; then
echo "Updating pyenv-virtualenv..."
cd "${_pyenv_virtualenv_dir}"
git pull
else
echo "Installing pyenv-virtualenv..."
git clone https://github.com/yyuu/pyenv-virtualenv "${_pyenv_virtualenv_dir}"
fi
echo "Installing dependencies..."
sudo apt install -y make build-essential libssl-dev zlib1g-dev libbz2-dev libreadline-dev libsqlite3-dev wget curl llvm libncurses5-dev libncursesw5-dev xz-utils
echo "Done!"