Skip to content

Commit 26268a8

Browse files
committed
fix: allow BUN_TERMUX_LOADER env override for loader repo path
find_loader_repo() now accepts explicit BUN_TERMUX_LOADER env var before falling back to hardcoded ~/bun-termux-loader search paths. This lets users place the loader repo anywhere without patching the script.
1 parent 55101ce commit 26268a8

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

‎tools/produce-local.sh‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,14 @@ UPSTREAM_BIN="$WORK_DIR/package/bin/opencode"
3333
GITHUB_URL="https://github.com/anomalyco/opencode/releases/download/v${VER}/opencode-linux-arm64.tar.gz"
3434

3535
find_loader_repo() {
36+
# Allow explicit override via environment variable
37+
if [[ -n "${BUN_TERMUX_LOADER:-}" ]]; then
38+
if [[ -f "$BUN_TERMUX_LOADER/build.py" ]]; then
39+
printf '%s' "$BUN_TERMUX_LOADER"
40+
return 0
41+
fi
42+
return 1
43+
fi
3644
local c
3745
for c in "$HOME/bun-termux-loader" "$HOME/develop/bun-termux-loader"; do
3846
if [[ -f "$c/build.py" ]]; then

0 commit comments

Comments
 (0)