-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup.sh
More file actions
executable file
·42 lines (33 loc) · 1.14 KB
/
Copy pathsetup.sh
File metadata and controls
executable file
·42 lines (33 loc) · 1.14 KB
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
#!/bin/bash
# Simple ADHD-friendly setup script for dev-cli
# This script helps you get started fast!
# Steps:
# 1. Check for Python 3
# 2. Make a virtual environment (venv)
# 3. Activate venv
# 4. Install dependencies
# 5. Install dev-cli in editable mode
# 6. Deactivate venv
# 7. Done!
set -e # Stop if anything fails
echo "Step 1: Checking for Python 3..."
if ! command -v python3 &> /dev/null; then
echo "Python 3 is NOT installed. Please install Python 3 and try again!"
exit 1
fi
echo "Step 2: Making a virtual environment (venv)..."
python3 -m venv venv
echo "Step 3: Activating venv..."
source venv/bin/activate
echo "Step 4: Installing dependencies..."
if [[ -f requirements.txt ]]; then
pip install --upgrade pip
pip install -r requirements.txt || { echo 'Dependency install failed!'; deactivate; exit 1; }
else
pip install . || { echo 'setup.py install failed!'; deactivate; exit 1; }
fi
echo "Step 5: Installing dev-cli in editable mode..."
pip install -e . || { echo 'Editable install failed!'; deactivate; exit 1; }
echo "Step 6: Deactivating venv..."
deactivate
echo "Step 7: All done! 🎉 You can now use dev-cli."