feat(installer): support Termux - #2
Conversation
Alan-TheGentleman
left a comment
There was a problem hiding this comment.
Hey Wilmer! Thanks for this — really clean PR. 👏
The Termux detection is solid (three-layered $PREFIX / uname -o / dir check), the non-Termux path is left untouched, and I especially like the #!/bin/sh + exec bash launcher — it funnels every invocation into bash so set -o pipefail can't blow up under dash. Nice touch adjusting the --help sed range too.
One minor robustness nit before merge:
pkg install runs under set -e
The script body runs with set -euo pipefail, so if pkg install exits non-zero (no network, stale repo, etc.) the script dies right there — and the user never sees the friendly re-check message you added below it:
pkg install -y $termux_packages
check_dependenciesSuggested fix
Let the install fail soft so the re-check + friendly hint still runs:
pkg install -y $termux_packages || true
check_dependenciesThat way a failed install lands on your ❌ missing required tools message with the pkg install -y ... hint, instead of an abrupt set -e exit.
That's the only thing. Apply that and I'll merge. Thanks again for making ./install.sh --all the single happy path across environments — that's exactly the right call.
|
Good catch, fixed in
|
Closes #1
PR Type
Summary
pkg install -y ...before continuing../install.sh --allinstall path.Changes
install.shpkginstalls, and a shell launcher fallback.README.mdTest Plan
bash -n install.sh./install.sh --help./install.sh --alldetected missingjq, ranpkg install -y jq, and completed installation.bash -n.shellcheck install.sh(not available in the current Termux environment)Contributor Checklist
type:*label (requires maintainer permissions in upstream)status:approved(requires maintainer permissions in upstream)Co-Authored-Bytrailers