forked from thebrumby/HotWalletClaimer
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinstall.sh
executable file
·92 lines (76 loc) · 3.1 KB
/
install.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
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
79
80
81
82
83
84
85
86
87
88
89
90
91
92
#!/bin/bash
# Update package list
sudo apt update
# Upgrade Python to the latest version
sudo apt install -y python3 python3-pip python3-venv
# Install or upgrade basic dependencies
sudo apt install -y snapd curl wget libzbar0 unzip gdebi-core || true
sudo systemctl daemon-reload
# Remove existing virtual environment if it exists
rm -rf venv
# Create a new virtual environment and install/upgrade Python packages
python3 -m venv venv
source venv/bin/activate
pip install --upgrade pip wheel
pip install --upgrade selenium Pillow pyzbar qrcode-terminal mitmproxy python-telegram-bot requests beautifulsoup4 brotli httpx
deactivate
# Installing Node.js and npm
curl -fsSL https://deb.nodesource.com/setup_current.x | sudo -E bash -
sudo apt-get install -y nodejs || true
# Install pm2 globally
sudo npm install pm2@latest -g
# Install or upgrade Chromium/Google Chrome and Chromedriver depending on architecture
install_chromium_arm64() {
sudo apt-get clean
sudo apt-get autoclean
sudo rm -rf /var/lib/apt/lists/
sudo apt update
sudo apt-get install xdg-utils libasound2-dev -y
wget http://launchpadlibrarian.net/660838579/chromium-codecs-ffmpeg-extra_112.0.5615.49-0ubuntu0.18.04.1_arm64.deb
sudo gdebi -n chromium-codecs-ffmpeg-extra_112.0.5615.49-0ubuntu0.18.04.1_arm64.deb
wget http://launchpadlibrarian.net/660838574/chromium-browser_112.0.5615.49-0ubuntu0.18.04.1_arm64.deb
sudo gdebi -n chromium-browser_112.0.5615.49-0ubuntu0.18.04.1_arm64.deb
wget http://launchpadlibrarian.net/660838578/chromium-chromedriver_112.0.5615.49-0ubuntu0.18.04.1_arm64.deb
sudo gdebi -n chromium-chromedriver_112.0.5615.49-0ubuntu0.18.04.1_arm64.deb
}
install_chromium_x86_64() {
sudo apt install -y chromium-browser chromium-chromedriver
}
install_google_chrome() {
wget -O /tmp/chrome.deb https://mirror.cs.uchicago.edu/google-chrome/pool/main/g/google-chrome-stable/google-chrome-stable_130.0.6723.58-1_amd64.deb
sudo dpkg -i /tmp/chrome.deb
sudo apt-get install -f -y
rm /tmp/chrome.deb
}
install_chromedriver() {
sudo apt install -y unzip || true
wget https://storage.googleapis.com/chrome-for-testing-public/130.0.6723.58/linux64/chromedriver-linux64.zip
unzip chromedriver-linux64.zip
rm chromedriver-linux64.zip
sudo mv chromedriver-linux64/chromedriver /usr/local/bin/
sudo chmod +x /usr/local/bin/chromedriver
}
ARCH=$(uname -m)
if [[ "$ARCH" == "x86_64" ]]; then
if ! google-chrome --version &>/dev/null; then
install_google_chrome
else
echo "Google Chrome is already installed."
fi
install_chromedriver
elif [[ "$ARCH" == "aarch64" ]]; then
install_chromium_arm64
else
echo "Unsupported architecture: $ARCH"
exit 1
fi
# Fetch and display installed versions
echo ""
echo "Installed Versions:"
echo "PM2 version: $(pm2 --version)"
echo "Python version: $(python3 --version)"
echo "Node.js version: $(node --version)"
echo "npm version: $(npm --version)"
echo "Chromium/Chrome version: $(chromium-browser --version || google-chrome --version)"
echo "Chromedriver version: $(chromedriver --version)"
echo "Architecture: $ARCH"