-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstart.command
More file actions
executable file
·40 lines (30 loc) · 803 Bytes
/
start.command
File metadata and controls
executable file
·40 lines (30 loc) · 803 Bytes
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
#! /bin/bash
echo "$(dirname "$0")"
cd "$(dirname "$0")"
if command -v python3 &>/dev/null; then
echo "Python3 is already installed"
else
echo "Python3 is not installed. Please install Python3."
fi
# Update pip
python3 -m pip install --upgrade pip >/dev/null 2>&1
# Check if virtual environment exists
if [ -d venv ]; then
echo "Virtual environment already exists"
else
echo "Creating virtual environment"
python3 -m venv venv
fi
# Activate virtual environment
source ./venv/bin/activate
# Check if packages exists
if pip3 list -format=rows | grep -f requirements.txt; then
echo "All dependencies are already installed"
else
echo "Some dependencies are missing. Installing now..."
pip3 install -r requirements.txt
fi
sleep 5
clear
# Run main.py
python3 main.py