Skip to content
This repository was archived by the owner on Aug 13, 2026. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ This script will:
- Detect your OS and architecture automatically
- Download the appropriate prebuilt binary
- Verify the checksum for security
- Install to `~/.local/bin` (or use `INSTALL_DIR` to customize)
- Install to `/usr/local/bin` on macOS/Linux or `~/.local/bin` on Windows (or use `INSTALL_DIR` to customize)
- Make the binary executable

**Custom installation directory:**
Expand Down
11 changes: 10 additions & 1 deletion install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ NC='\033[0m' # No Color

# Configuration
REPO="hdresearch/vers-cli"
INSTALL_DIR="${INSTALL_DIR:-$HOME/.local/bin}"
INSTALL_DIR="${INSTALL_DIR:-}"
GITHUB_API="https://api.github.com/repos/${REPO}/releases/latest"

# Helper functions
Expand Down Expand Up @@ -118,6 +118,15 @@ main() {
ARCH=$(detect_arch)
info "Detected OS: $OS, Architecture: $ARCH"

# Use a PATH location by default on macOS/Linux while preserving the
# existing Windows install location. An explicit INSTALL_DIR takes priority.
if [ -z "$INSTALL_DIR" ]; then
case "$OS" in
linux|darwin) INSTALL_DIR="/usr/local/bin" ;;
windows) INSTALL_DIR="$HOME/.local/bin" ;;
esac
fi

# Get version
VERSION="${VERS_VERSION:-$(get_latest_version)}"
info "Installing version: $VERSION"
Expand Down
Loading