#!/bin/sh
# Q132 CHECK -- tool_map.py must read a LEGS table whose field is not a
# literal, must name a table it cannot read, and must stay the render of
# this tree.
#
# rc 0 = every leg as expected; 1 = a graded fault; 2 = could not grade.
# The work is done by wizard-work/volt/q132_verify.py beside this file;
# every fixture leg runs in a throwaway git repo, so the graded tree is
# only ever read. Run it from any checkout.
set -u
REPO="$(cd "$(dirname "$0")/../.." && pwd)" || exit 2
if ! cd "$REPO"; then
    echo "q132: could not grade -- cannot cd to $REPO"
    exit 2
fi
if ! command -v python3 >/dev/null 2>&1; then
    echo "q132: could not grade -- no python3 on PATH"
    exit 2
fi
exec python3 wizard-work/volt/q132_verify.py
