Add downloadRossoctl install script#10
Open
esnible wants to merge 1 commit into
Open
Conversation
Add a POSIX-sh installer meant to be piped into sh: curl -fsSL .../downloadRossoctl | sh It detects the platform via `uname` / `uname -m` (normalizing aarch64 -> arm64 to match the release asset labels), downloads the matching rossoctl-<version>-<os>-<arch>.tar.gz release archive, extracts it into a temp dir (cleaned up on exit), and installs the binary at $HOME/.rossoctl/rossoctl with chmod +x, then prints a PATH hint. Version defaults to the latest release (resolved via the /releases/latest redirect) and can be pinned with ROSSOCTL_CLI_VERSION. Follows pipe-to-sh best practices: set -eu, all logic wrapped in main() invoked on the last line (partial downloads don't execute), curl/wget fallback, and clear errors for unsupported OS/arch and failed downloads. README documents it. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Signed-off-by: Ed Snible <snible@us.ibm.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds
downloadRossoctlat the repo root — a POSIX-shinstaller meant to be piped intosh:curl -fsSL https://raw.githubusercontent.com/kagenti/rossoctl-cli/main/downloadRossoctl | shIt detects the platform via
uname/uname -m, downloads the matchingrossoctl-<version>-<os>-<arch>.tar.gzrelease archive, extracts it into a temp dir, and installs the binary at$HOME/.rossoctl/rossoctl(chmod +x), then prints aPATHhint.Behavior
/releases/latestredirect); pin withROSSOCTL_CLI_VERSION=v0.1.0.aarch64→arm64,amd64→x86_64, to match the release asset labels (Linuxuname -mreportsaarch64, but assets are labeledarm64).$HOME/.rossoctl/rossoctl; the script prints how to add$HOME/.rossoctltoPATH(it does not edit rc files).Pipe-to-sh best practices
set -eu; all logic wrapped inmain()invoked on the last line, so a truncated download can't execute a partial script.curl-or-wgetfallback;mktemptemp dir with a cleanuptrap.ROSSOCTL_CLI_VERSION" case.Verification
shellcheck -s shandsh -nboth clean.v0.1.0-alpha.1release end-to-end (rossoctl version→v0.1.0-alpha.1); also tested a local mock server, arch/OS normalization, and the error paths (unsupported arch/OS, 404 download, latest-with-only-prereleases).100755) tracked in git.README updated with the one-liner.
🤖 Generated with Claude Code