#!/bin/bash
# Build script for trilogy-parser

set -e

echo "Building trilogy-parser..."

# Check for Rust
if ! command -v cargo &> /dev/null; then
    echo "Rust is not installed. Install from https://rustup.rs/"
    exit 1
fi

# Build release binary
cargo build --release

echo ""
echo "Build successful!"
echo "Binary location: ./target/release/trilogy-parser-cli"
echo ""
echo "To install globally, run:"
echo "  cargo install --path ."
echo ""
echo "To test:"
echo "  ./target/release/trilogy-parser-cli --help"
