tweak(setup): Improvements to setup script (#7469)

Co-authored-by: Nicholas Tindle <nicholas.tindle@agpt.co>
Co-authored-by: Toran Bruce Richards <toran.richards@gmail.com>
This commit is contained in:
Amelia Bruno
2024-08-05 01:13:25 -04:00
committed by GitHub
parent bb5baadeb2
commit 52bd033a02
2 changed files with 26 additions and 10 deletions

2
cli.py
View File

@@ -69,6 +69,8 @@ d88P 888 "Y88888 "Y888 "Y88P" "Y8888P88 888 888
bold=True,
)
)
else:
click.echo(click.style("🎉 Setup completed!\n", fg="green"))
@cli.group()

View File

@@ -10,21 +10,35 @@ else
if ! command -v python3 &> /dev/null
then
echo "python3 could not be found"
echo "Installing python3 using pyenv..."
if ! command -v pyenv &> /dev/null
then
echo "pyenv could not be found"
echo "Installing pyenv..."
curl https://pyenv.run | bash
echo "Install python3 using pyenv ([y]/n)?"
read response
if [[ "$response" == "y" || -z "$response" ]]; then
echo "Installing python3..."
if ! command -v pyenv &> /dev/null
then
echo "pyenv could not be found"
echo "Installing pyenv..."
curl https://pyenv.run | bash
fi
pyenv install 3.11.5
pyenv global 3.11.5
else
echo "Aborting setup"
exit 1
fi
pyenv install 3.11.5
pyenv global 3.11.5
fi
if ! command -v poetry &> /dev/null
then
echo "poetry could not be found"
echo "Installing poetry..."
curl -sSL https://install.python-poetry.org | python3 -
echo "Install poetry using official installer ([y]/n)?"
read response
if [[ "$response" == "y" || -z "$response" ]]; then
echo "Installing poetry..."
curl -sSL https://install.python-poetry.org | python3 -
else
echo "Aborting setup"
exit 1
fi
fi
fi