#!/bin/bash # This is tanacchi's auto-setup-script PYTHON_VERSION="3.9.0" # set -eu # Update repositories and packages sudo apt update -y sudo apt upgrade -y sudo apt dist-upgrade -y # Setup pyenv if [ ! -d "${HOME}/.pyenv" ]; then curl https://raw.githubusercontent.com/tanacchi/dotfiles/master/scripts/tools/pyenv.sh | sh else echo "pyenv is already setup." fi export PYENV_ROOT="$HOME/.pyenv" export PATH="$PYENV_ROOT/bin:$PATH" eval "$(pyenv init -)" pyenv versions | grep ${PYTHON_VERSION} if [ $? -ne 0 ]; then pyenv install ${PYTHON_VERSION} fi pyenv global ${PYTHON_VERSION} curl https://raw.githubusercontent.com/tanacchi/dotfiles/master/scripts/setup/autosetup.py | python