-
Notifications
You must be signed in to change notification settings - Fork 0
/
install-prereqs.sh
executable file
·52 lines (40 loc) · 1.25 KB
/
install-prereqs.sh
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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
#!/usr/bin/env bash
set -e
sudo grep $USER /etc/sudoers > /dev/null 2>&1
if (( $? ))
then
echo "Making passwordless sudo"
echo "$USER ALL=(ALL) NOPASSWD: ALL" | (sudo su -c 'EDITOR="tee" visudo')
fi
pyenv_root=$HOME/.pyenv
if [[ -e $pyenv_root ]]
then
echo "pyenv is already installed. Skipping"
else
echo "Installing needed libs"
sudo apt-get update -y
sudo apt-get install -y make build-essential libssl-dev zlib1g-dev \
libbz2-dev libreadline-dev libsqlite3-dev wget curl llvm \
libncursesw5-dev xz-utils tk-dev libxml2-dev libxmlsec1-dev libffi-dev liblzma-dev
echo "Installing pyenv"
curl https://pyenv.run | bash
export PYENV_ROOT="$HOME/.pyenv"
export PATH="$PYENV_ROOT/bin:$PATH"
eval "$(pyenv init --path)"
fi
echo "Installing python 3.6.12 via pyenv"
pyenv install 3.6.15
echo "Installing python 3.8.12 via pyenv"
pyenv install 3.8.12
echo "Setting python 3.8.12 as default"
pyenv global 3.8.12
if [[ -e $HOME/.config/pypoetry ]]
then
debug_out "poetry is already installed. Skipping"
else
echo "Installing poetry"
curl -sSL https://raw.githubusercontent.com/python-poetry/poetry/master/get-poetry.py | python -
source $HOME/.poetry/env
fi
echo "Setting up neovim"
sudo apt install neovim