-
Notifications
You must be signed in to change notification settings - Fork 4
/
setup.sh
31 lines (24 loc) · 647 Bytes
/
setup.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
#!/bin/bash
# Poetry is must for this script
read -p "Do you have poetry installed? (y/n): " poetry_yn
if [[ $poetry_yn == "y" || $poetry_yn == "Y" ]] then
# install poetry deps
echo "Installing project dependencies using Poetry..."
poetry install
read -p "Do you want to start server? (y/n): " start_yn
case $start_yn in
[Yy]* )
echo "Server starting..."
poetry run dev;;
[Nn]* )
echo "Exiting..."
echo "you can run server later using the command:"
echo "poetry run dev"
exit;;
* ) exit 0
esac
else
echo "Sorry, this script only works with poetry"
echo "Please install it and re-run this script"
exit 0
fi