#!/usr/bin/env bash # Build the tool and put it in ~/.local/bin. # # bash install.sh build, link, and stop there # bash install.sh --setup also write the wrapper, the proxies and the router set -euo pipefail here="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" cargo build --release --manifest-path "$here/Cargo.toml" mkdir -p "$HOME/.local/bin" ln -sf "$here/target/release/claude-account" "$HOME/.local/bin/claude-account" echo "Linked ~/.local/bin/claude-account -> $here/target/release/claude-account" if [ "${1:-}" = "--setup" ]; then "$HOME/.local/bin/claude-account" setup else echo "Run 'claude-account setup' to write the wrapper, the proxies and the router." fi