#!/bin/bash
# build.sh — compile the release binary and stage it into bin/ for packaging.
set -euo pipefail

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

cargo build --release
mkdir -p bin
install -m 0755 "target/release/adom-schematic-viewer" "bin/adom-schematic-viewer"
echo "staged bin/adom-schematic-viewer ($(du -h bin/adom-schematic-viewer | cut -f1))"