#!/usr/bin/env bash
set -euo pipefail

if [[ "$#" -ne 2 ]]; then
    echo "usage: $0 <benchmark.cnf> <output-directory>" >&2
    exit 2
fi

ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
CNF="$1"
OUT_DIR="$2"

mkdir -p "$OUT_DIR"
export PATH="$ROOT/third-party/bin:$ROOT/third-party:$ROOT/third-party/veripb/bin:$ROOT/third-party/veripb:${PATH:-}"

exec "$ROOT/solver/solver" "$CNF" "$OUT_DIR/proof.out"
