Build/install-termux.sh
17 lines · 502 bytes · executable
1#!/data/data/com.termux/files/usr/bin/bash
2set -euo pipefail
3
4REPO="${REPO:-wraient/curd}"
5ASSET="${ASSET:-curd-android-arm64}"
6INSTALL_DIR="${PREFIX:-/data/data/com.termux/files/usr}/bin"
7TARGET="${INSTALL_DIR}/curd"
8TMP="$(mktemp)"
9
10echo "Downloading ${ASSET} from ${REPO}..."
11curl -fsSL "https://github.com/${REPO}/releases/latest/download/${ASSET}" -o "${TMP}"
12chmod +x "${TMP}"
13mkdir -p "${INSTALL_DIR}"
14mv "${TMP}" "${TARGET}"
15
16echo "Installed curd to ${TARGET}"
17echo "Run: curd --android-setup"