Skip to content

Commit 448b68c

Browse files
committed
What would I do without you, ChatGPT??
1 parent e288659 commit 448b68c

File tree

1 file changed

+13
-8
lines changed

1 file changed

+13
-8
lines changed

deploy.sh

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,33 @@
11
#!/usr/bin/env bash
22

3-
# Update the package list and install python3-venv
4-
sudo apt-get update
5-
sudo apt-get install -y python3-venv
6-
73
# Check if python3 is available
84
if ! command -v python3 &> /dev/null
95
then
106
echo "Python3 could not be found"
117
exit 1
128
fi
139

10+
# Check if python3-venv is available
11+
if ! python3 -m venv &> /dev/null
12+
then
13+
echo "Installing python3-venv"
14+
apt-get update
15+
apt-get install -y python3-venv
16+
fi
17+
18+
# Create and activate a virtual environment
19+
python3 -m venv venv
20+
source venv/bin/activate
21+
1422
# Ensure pip is available
1523
if ! command -v pip &> /dev/null
1624
then
25+
echo "Installing pip"
1726
curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py
1827
python3 get-pip.py
1928
rm get-pip.py
2029
fi
2130

22-
# Create and activate a virtual environment
23-
python3 -m venv venv
24-
source venv/bin/activate
25-
2631
# Install dependencies
2732
pip install --upgrade pip
2833
pip install -r requirements.txt

0 commit comments

Comments
 (0)