#!/bin/bash
# install.sh for adom-schematic (app).
# Runs from the extracted module directory (~/project/adom_modules/adom-schematic/).
set -euo pipefail

DIR="$(cd "$(dirname "$0")" && pwd)"
cd "$DIR"

BIN_DIR="${HOME}/.local/bin"
mkdir -p "$BIN_DIR"
install -m 0755 "$DIR/bin/adom-schematic" "$BIN_DIR/adom-schematic"
echo "Installed adom-schematic -> $BIN_DIR/adom-schematic"

# Renamed from adom-schematic-viewer: drop the old command so upgraders don't keep a
# stale binary shadowing this one.
rm -f "$BIN_DIR/adom-schematic-viewer"
