forked from shroominic/funcchain
-
Notifications
You must be signed in to change notification settings - Fork 0
/
dev-setup.sh
executable file
·46 lines (36 loc) · 1.01 KB
/
dev-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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
# AUTO DEV SETUP
# check if rye is installed
if ! command -v rye &> /dev/null
then
echo "rye could not be found"
echo "Would you like to install via rye or pip? Enter 'rye' or 'pip':"
read install_method
clear
if [ "$install_method" = "rye" ]
then
echo "Installing via rye now ..."
curl -sSf https://rye-up.com/get | bash
echo "Check the rye docs for more info: https://rye-up.com/"
elif [ "$install_method" = "pip" ]
then
echo "Installing via pip now ..."
python3 -m venv .venv
source .venv/bin/activate
pip install -r requirements.lock
else
echo "Invalid option. Please run the script again and enter 'rye' or 'pip'."
exit 1
fi
clear
fi
if [ "$install_method" = "rye" ]
then
echo "SYNC: setup .venv"
rye sync
echo "ACTIVATE: activate .venv"
rye shell
clear
fi
echo "SETUP: install pre-commit hooks"
pre-commit install
echo "Try running 'python example/chatgpt.py' to test your setup"