-
Notifications
You must be signed in to change notification settings - Fork 98
Expand file tree
/
Copy pathinstall.sh
More file actions
executable file
·78 lines (64 loc) · 1.74 KB
/
install.sh
File metadata and controls
executable file
·78 lines (64 loc) · 1.74 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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
#!/usr/bin/env bash
set -e
remove_path() {
if [ -e "$1" ]; then
echo "Removing existing $1..."
rm -rf "$1"
fi
}
# ----------------------------
# Install system packages
# ----------------------------
apt update && apt install -y python3-apt
apt-get update && apt-get install -y ffmpeg
apt-get update && apt-get install -y \
libgl1 \
libglib2.0-0
apt-get update && apt-get install -y \
unzip \
python3 \
python3-dev\
python3-pip \
gcc \
g++ \
libapt-pkg-dev \
build-essential
# ----------------------------
# Upgrade pip and install gdown if missing
# ----------------------------
python -m pip install --upgrade pip
if ! python -m pip show gdown &> /dev/null; then
python -m pip install gdown --no-cache-dir
fi
# ----------------------------
# Download & unzip Google Drive files
# ----------------------------
download_and_unzip() {
FILE_ID="$1"
DEST="$2"
ZIP_NAME="${DEST}.zip"
remove_path "$DEST"
remove_path "$ZIP_NAME"
echo "Downloading $ZIP_NAME..."
gdown "$FILE_ID" -O "$ZIP_NAME"
if unzip -tq "$ZIP_NAME" &> /dev/null; then
echo "Unzipping $ZIP_NAME..."
unzip -q "$ZIP_NAME"
rm "$ZIP_NAME"
else
echo "❌ $ZIP_NAME is not a valid zip file!"
exit 1
fi
}
download_and_unzip 1F2MJQ5enUPVtyi3s410PUuv8LiWr8qCz assets
download_and_unzip 1LAOL8sYCUfsCk3TEA3vvyJCLSl0EdwYB attacks
# ----------------------------
# Install Python dependencies
# ----------------------------
if [ -f requirements.txt ]; then
echo "Installing Python dependencies..."
python3 -m pip install -r requirements.txt
else
echo "No requirements.txt found. Skipping Python dependency installation."
fi
echo "✅ Installation complete."