#!/usr/bin/env bash # BRIK-64 Install Script — v4.0.0-beta.2 # Usage: curl -fsSL https://brik64.dev/install | bash set -e VERSION="4.0.0-beta.2" BASE="https://brik64.dev/install/download" detect_platform() { local OS ARCH OS="$(uname -s)" ARCH="$(uname -m)" case "${OS}" in Darwin) case "${ARCH}" in arm64) echo "darwin-arm64" ;; x86_64) echo "darwin-x86_64" ;; *) echo ""; return 1 ;; esac ;; Linux) case "${ARCH}" in x86_64) echo "linux-x86_64" ;; aarch64) echo "linux-arm64" ;; *) echo ""; return 1 ;; esac ;; *) echo "" return 1 ;; esac } PLATFORM="$(detect_platform)" if [ -z "${PLATFORM}" ]; then echo "ERROR: Unsupported platform: $(uname -s)/$(uname -m)" exit 1 fi BINARY="brikc-${PLATFORM}" INSTALL_DIR="${HOME}/.local/bin" mkdir -p "${INSTALL_DIR}" echo "Installing BRIK-64 brikc v${VERSION} for ${PLATFORM}..." curl -fsSL "${BASE}/${BINARY}" -o "${INSTALL_DIR}/brikc" chmod +x "${INSTALL_DIR}/brikc" # Remove macOS quarantine if [[ "$(uname -s)" == "Darwin" ]]; then xattr -d com.apple.quarantine "${INSTALL_DIR}/brikc" 2>/dev/null || true fi echo "" echo " ✓ Installed: ${INSTALL_DIR}/brikc" "${INSTALL_DIR}/brikc" -V # Add to PATH if needed if ! echo "$PATH" | grep -q "${INSTALL_DIR}"; then echo "" echo " Add to your shell profile:" echo " export PATH=\"\$HOME/.local/bin:\$PATH\"" fi