Skip to content

feat(installer): support Termux - #2

Open
wahh-22 wants to merge 2 commits into
Gentleman-Programming:mainfrom
wahh-22:feat/termux-support
Open

feat(installer): support Termux#2
wahh-22 wants to merge 2 commits into
Gentleman-Programming:mainfrom
wahh-22:feat/termux-support

Conversation

@wahh-22

@wahh-22 wahh-22 commented Jun 19, 2026

Copy link
Copy Markdown

Closes #1

PR Type

  • New feature

Summary

  • Add explicit Termux detection to the installer.
  • Automatically install missing Termux dependencies with pkg install -y ... before continuing.
  • Document that Termux uses the same ./install.sh --all install path.

Changes

File Change
install.sh Adds Termux detection, dependency re-checking, automatic pkg installs, and a shell launcher fallback.
README.md Documents automatic Termux dependency installation.

Test Plan

  • bash -n install.sh
  • ./install.sh --help
  • Real Termux install: ./install.sh --all detected missing jq, ran pkg install -y jq, and completed installation.
  • Verified installed tmux scripts with bash -n.
  • shellcheck install.sh (not available in the current Termux environment)

Contributor Checklist

  • Linked an issue
  • Added exactly one type:* label (requires maintainer permissions in upstream)
  • Confirmed linked issue has status:approved (requires maintainer permissions in upstream)
  • Docs updated for behavior change
  • Conventional commit format
  • No Co-Authored-By trailers

@Alan-TheGentleman Alan-TheGentleman left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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_dependencies

Suggested fix

Let the install fail soft so the re-check + friendly hint still runs:

pkg install -y $termux_packages || true
check_dependencies

That 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.

@wahh-22

wahh-22 commented Jun 20, 2026

Copy link
Copy Markdown
Author

Good catch, fixed in de5986b.

pkg install now fails soft, then the dependency re-check runs and surfaces the friendly missing-tools message with the Termux retry command. I also verified the failure path with a simulated failing pkg, plus bash -n install.sh and ./install.sh --help.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat(installer): support Termux

2 participants