#!/bin/sh # Harbor - https://harbor.dev set -e INSTALL_DIR="/usr/local/bin" BINARY_URL="https://harbor.sh/harbor" # Use ~/bin if /usr/local/bin isn't writable if [ ! -w "$INSTALL_DIR" ]; then INSTALL_DIR="$HOME/.local/bin" mkdir -p "$INSTALL_DIR" fi echo "Installing Harbor to $INSTALL_DIR..." curl -fsSL "$BINARY_URL" -o "$INSTALL_DIR/harbor" chmod +x "$INSTALL_DIR/harbor" echo "Harbor installed successfully!" echo "Run 'harbor --help' to get started." # Remind if install dir isn't in PATH case ":$PATH:" in *":$INSTALL_DIR:"*) ;; *) echo "Note: Add $INSTALL_DIR to your PATH if not already." ;; esac