#!/data/data/com.termux/files/usr/bin/bash
# Meshagora — Termux dependency installer
# Run once before first use: bash install_termux.sh

set -e

echo "========================================"
echo "Meshagora — Termux Setup"
echo "========================================"

echo ""
echo "[1/2] Installing system packages..."
pkg install -y python net-tools libjpeg-turbo libpng

echo ""
echo "[2/2] Installing Python packages..."
pip install flask "qrcode[pil]"

echo ""
echo "========================================"
echo "Setup complete."
echo ""
echo "Before starting the server:"
echo "  1. Enable Android mobile hotspot"
echo "  2. Run: python3 meshagora.py"
echo "========================================"
