diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a633f3f..f5322bc 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -48,6 +48,7 @@ jobs: run: | sudo apt-get update -qq && sudo apt-get install -y shellcheck # Termux scripts use a Termux shebang that shellcheck cannot resolve, - # so the shell dialect is named explicitly. + # so the shell dialect is named explicitly. --severity=warning keeps + # info/style notes from failing the build across shellcheck versions. find . -name '*.sh' -not -path './.git/*' -print0 \ - | xargs -0 -r shellcheck --shell=bash --external-sources + | xargs -0 -r shellcheck --shell=bash --severity=warning --external-sources diff --git a/install.sh b/install.sh index 6ba6eb3..4ed1a81 100755 --- a/install.sh +++ b/install.sh @@ -8,7 +8,9 @@ die() { printf 'error: %s\n' "$*" >&2; exit 1; } # --- preflight ------------------------------------------------------------- # Fail early with a clear message rather than halfway through a package install. -[ -n "${PREFIX:-}" ] && [ -d "$PREFIX" ] || die "this must run inside Termux (\$PREFIX not set)" +if [ -z "${PREFIX:-}" ] || [ ! -d "$PREFIX" ]; then + die "this must run inside Termux (\$PREFIX not set)" +fi case "$(uname -m)" in aarch64|arm64) : ;; *) die "built for aarch64 phones; this device is $(uname -m)" ;;