#!/data/data/com.termux/files/usr/bin/bash # One-shot: clone, build and install CST-Agent on Android Termux. set -euo pipefail REPO_URL="${CST_AGENT_REPO:-https://git.whcself.xyz/WHC/CST-agent.git}" DIR="${1:-CST-agent}" echo "==> Termux packages" pkg install -y git clang make pkg-config binutils libcurl ncurses if [[ ! -f "$DIR/Makefile" ]]; then echo "==> git clone $REPO_URL -> $DIR" git clone "$REPO_URL" "$DIR" fi cd "$DIR" echo "==> build" make -j"$(nproc 2>/dev/null || echo 4)" make check || echo "warning: some tests failed (see above)" echo "==> install to $PREFIX/bin" make install echo echo "OK: run 'cst-agent' inside a project directory." echo "The first start asks for the provider and its API key and saves them."