#!/usr/bin/env bash
# Local development build + install.
set -euo pipefail

cd "$(dirname "$0")"

echo "== cargo build --release =="
cargo build --release

echo "== installing to /usr/local/bin =="
sudo install -m 0755 target/release/adom-step2glb /usr/local/bin/adom-step2glb
sudo ln -sf /usr/local/bin/adom-step2glb /usr/local/bin/step2glb  # back-compat alias
/usr/local/bin/adom-step2glb --version

echo "== running install (skill + completions) =="
adom-step2glb install

echo ""
echo "done. Try: adom-step2glb health"
