From 7fb2b76e82ee77eaec246a0b7fc4fd882ae411c4 Mon Sep 17 00:00:00 2001 From: Alex Collins Date: Sat, 22 Nov 2025 10:07:17 -0800 Subject: [PATCH] docs: simplify installation with auto-detected platform and arch --- README.md | 33 +++++++++++---------------------- 1 file changed, 11 insertions(+), 22 deletions(-) diff --git a/README.md b/README.md index 89d7347..3ae8157 100644 --- a/README.md +++ b/README.md @@ -19,33 +19,21 @@ Binaries are available for: Download the binary for your platform from the [release page](https://github.com/kitproj/jira-cli/releases). -#### Linux +#### Linux and macOS -**For Linux (amd64):** -```bash -sudo curl -fsL -o /usr/local/bin/jira https://github.com/kitproj/jira-cli/releases/download/v0.0.15/jira_v0.0.15_linux_amd64 -sudo chmod +x /usr/local/bin/jira -``` +The installation script automatically detects your platform and architecture: -**For Linux (arm64):** ```bash -sudo curl -fsL -o /usr/local/bin/jira https://github.com/kitproj/jira-cli/releases/download/v0.0.15/jira_v0.0.15_linux_arm64 +VERSION=v0.0.15 +PLATFORM=$(uname -s | tr '[:upper:]' '[:lower:]') +ARCH=$(uname -m | sed 's/x86_64/amd64/' | sed 's/aarch64/arm64/') +sudo curl -fsL -o /usr/local/bin/jira https://github.com/kitproj/jira-cli/releases/download/${VERSION}/jira_${VERSION}_${PLATFORM}_${ARCH} sudo chmod +x /usr/local/bin/jira ``` -#### macOS - -**For macOS (Apple Silicon/arm64):** -```bash -sudo curl -fsL -o /usr/local/bin/jira https://github.com/kitproj/jira-cli/releases/download/v0.0.15/jira_v0.0.15_darwin_arm64 -sudo chmod +x /usr/local/bin/jira -``` - -**For macOS (Intel/amd64):** -```bash -sudo curl -fsL -o /usr/local/bin/jira https://github.com/kitproj/jira-cli/releases/download/v0.0.15/jira_v0.0.15_darwin_amd64 -sudo chmod +x /usr/local/bin/jira -``` +This works for: +- **Linux**: amd64, arm64 +- **macOS**: amd64 (Intel), arm64 (Apple Silicon) #### Verify Installation @@ -257,9 +245,10 @@ This automation helps keep your Jira board in sync with your actual development fi if [ ! -e ~/bin/jira ]; then + VERSION=v0.0.15 platform=$(uname -s | tr '[:upper:]' '[:lower:]') arch=$(uname -m | sed 's/x86_64/amd64/' | sed 's/aarch64/arm64/') - curl -fsL -o ~/bin/jira https://github.com/kitproj/jira-cli/releases/download/v0.0.15/jira_v0.0.15_${platform}_${arch} + curl -fsL -o ~/bin/jira https://github.com/kitproj/jira-cli/releases/download/${VERSION}/jira_${VERSION}_${platform}_${arch} mkdir -p ~/bin chmod +x ~/bin/jira fi