#!/usr/bin/env bash # install-ai — PATH-facing launcher for the fresh-project bootstrapper. # # make install symlinks this into ~/.local/bin/install-ai (same bin loop that # links `ai` and `agent-text`), so `install-ai [--track|--gitignore] [PROJECT]` # runs from anywhere. The real logic lives in scripts/install-ai.sh; this # resolves its own location through the ~/.local/bin symlink and execs that # script by its true repo path, so the script's own repo-root computation # (dirname "$0"/..) stays correct. dotfiles needs no copy — the symlink always # points at the canonical. set -euo pipefail # Resolve this file through any symlink chain to its real location in the repo. source="${BASH_SOURCE[0]}" while [ -L "$source" ]; do dir="$(cd -P "$(dirname "$source")" && pwd)" source="$(readlink "$source")" [[ "$source" != /* ]] && source="$dir/$source" done bindir="$(cd -P "$(dirname "$source")" && pwd)" # /claude-templates/bin repo="$(cd -P "$bindir/../.." && pwd)" # exec "$repo/scripts/install-ai.sh" "$@"