-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathinstall.sh
More file actions
78 lines (67 loc) · 1.74 KB
/
Copy pathinstall.sh
File metadata and controls
78 lines (67 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
#!/bin/bash
# ZynoxAI - Dependency Installer
# Installs Python + required pip packages only
set -e
# Colors
RED='\033[0;31m'
GREEN='\033[0;32m'
YELLOW='\033[1;33m'
CYAN='\033[0;36m'
NC='\033[0m'
print_info() { echo -e "${CYAN}[INFO]${NC} $1"; }
print_success() { echo -e "${GREEN}[OK]${NC} $1"; }
print_error() { echo -e "${RED}[ERROR]${NC} $1"; }
# Detect OS
if [[ -f /data/data/com.termux/files/usr/bin/pkg ]]; then
PKG="pkg"
print_info "Detected: Termux"
elif command -v apt &>/dev/null; then
PKG="apt"
print_info "Detected: Debian/Ubuntu"
elif command -v yum &>/dev/null; then
PKG="yum"
print_info "Detected: RHEL/CentOS"
elif command -v dnf &>/dev/null; then
PKG="dnf"
print_info "Detected: Fedora"
elif command -v pacman &>/dev/null; then
PKG="pacman"
print_info "Detected: Arch Linux"
elif command -v brew &>/dev/null; then
PKG="brew"
print_info "Detected: macOS"
else
print_error "Package manager not found"
exit 1
fi
# Install Python and pip
print_info "Installing Python and pip..."
case $PKG in
pkg)
pkg update -y
pkg install -y python python-pip
;;
apt)
sudo apt update -y
sudo apt install -y python3 python3-pip
;;
yum)
sudo yum install -y python3 python3-pip
;;
dnf)
sudo dnf install -y python3 python3-pip
;;
pacman)
sudo pacman -S --noconfirm python python-pip
;;
brew)
brew install python3
;;
esac
print_success "Python installed"
# Install pip packages
print_info "Installing Python packages..."
pip3 install requests colorama flask flask-socketio eventlet python-telegram-bot
print_success "All packages installed"
echo ""
print_info "Done. You can now run: zynox"