Skip to content

feat: support custom version and binary name via env vars in install.sh#37

Closed
mvanhorn wants to merge 1 commit into
mabd-dev:mainfrom
mvanhorn:osc/35-install-env-vars
Closed

feat: support custom version and binary name via env vars in install.sh#37
mvanhorn wants to merge 1 commit into
mabd-dev:mainfrom
mvanhorn:osc/35-install-env-vars

Conversation

@mvanhorn

Copy link
Copy Markdown

Closes #35.

Adds two optional env vars to install.sh:

  • VERSION: skip the GitHub releases API lookup and install a specific tag instead.
  • ALIAS: install the binary under a different name (defaults to reposcan).

Both default to current behavior when unset, so the standard one-liner still works unchanged.

Changes

  • install.sh: gates the latest-version fetch on [ -n "${VERSION:-}" ]; resolves ALIAS=${ALIAS:-${BINARY_NAME}} once at top-of-file and uses it for the destination filename and the manual-install hint.
  • README.md: adds an #### Optional environment variables subsection with three examples (pin version, alias, both).

Verification

  • sh -n install.sh parses cleanly (POSIX, no bashisms — ${VAR:-default} is in POSIX).
  • go test ./... still green.
  • The standard install path (no env vars) hits the same code path it used before.

@mabd-dev mabd-dev closed this Apr 27, 2026
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.

[FEATURE]: support custom version and binary name via env vars

2 participants