Skip to content

Commit 52bd033

Browse files
amebruntindleTorantulino
authored
tweak(setup): Improvements to setup script (Significant-Gravitas#7469)
Co-authored-by: Nicholas Tindle <[email protected]> Co-authored-by: Toran Bruce Richards <[email protected]>
1 parent bb5baad commit 52bd033

File tree

2 files changed

+26
-10
lines changed

2 files changed

+26
-10
lines changed

cli.py

+2
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,8 @@ def setup():
6969
bold=True,
7070
)
7171
)
72+
else:
73+
click.echo(click.style("🎉 Setup completed!\n", fg="green"))
7274

7375

7476
@cli.group()

setup.sh

+24-10
Original file line numberDiff line numberDiff line change
@@ -10,21 +10,35 @@ else
1010
if ! command -v python3 &> /dev/null
1111
then
1212
echo "python3 could not be found"
13-
echo "Installing python3 using pyenv..."
14-
if ! command -v pyenv &> /dev/null
15-
then
16-
echo "pyenv could not be found"
17-
echo "Installing pyenv..."
18-
curl https://pyenv.run | bash
13+
echo "Install python3 using pyenv ([y]/n)?"
14+
read response
15+
if [[ "$response" == "y" || -z "$response" ]]; then
16+
echo "Installing python3..."
17+
if ! command -v pyenv &> /dev/null
18+
then
19+
echo "pyenv could not be found"
20+
echo "Installing pyenv..."
21+
curl https://pyenv.run | bash
22+
fi
23+
pyenv install 3.11.5
24+
pyenv global 3.11.5
25+
else
26+
echo "Aborting setup"
27+
exit 1
1928
fi
20-
pyenv install 3.11.5
21-
pyenv global 3.11.5
2229
fi
2330

2431
if ! command -v poetry &> /dev/null
2532
then
2633
echo "poetry could not be found"
27-
echo "Installing poetry..."
28-
curl -sSL https://install.python-poetry.org | python3 -
34+
echo "Install poetry using official installer ([y]/n)?"
35+
read response
36+
if [[ "$response" == "y" || -z "$response" ]]; then
37+
echo "Installing poetry..."
38+
curl -sSL https://install.python-poetry.org | python3 -
39+
else
40+
echo "Aborting setup"
41+
exit 1
42+
fi
2943
fi
3044
fi

0 commit comments

Comments
 (0)