-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsetup.sh
executable file
·41 lines (31 loc) · 911 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
32
33
34
35
36
37
38
39
40
41
#!/bin/bash
set -e
echo "Checking for required dependencies..."
sudo apt-get update
if ! command -v nmap &> /dev/null; then
echo "Installing Nmap..."
sudo apt-get install nmap -y
fi
if ! command -v npm &> /dev/null; then
echo "Installing Node.js ..."
curl -fsSL https://deb.nodesource.com/setup_18.x | sudo -E bash -
sudo apt-get install -y nodejs
fi
if ! dpkg -l | grep -q python3-venv; then
echo "Installing Python3 venv module..."
sudo apt-get install python3-venv -y
fi
echo "Setting up Python virtual environment..."
python3 -m venv venv
source venv/bin/activate
echo "Installing Python dependencies..."
pip install -r requirements.txt
if [ -d "template" ]; then
echo "Installing Node.js dependencies..."
cd template
npm install
cd ..
else
echo "Template directory not found. Skipping Node.js setup."
fi
echo "Setup complete. Execute run.sh ....."