#!/bin/sh
# Version: 2025-08-19
# Stripped down: 2026-03-16
# ------------------------------------------------------------------------
shout() { echo "rts: $@" >&2; }
barf() { shout "fatal: $@"; exit 111; }
safe() { "$@" || barf "cannot $@"; }

umask 022
[ -d package ] || barf "no package directory"
[ -d src     ] || barf "no src directory"
[ -d compile ] || barf "no compile directory"

here=`env - PATH=$PATH pwd`
safe cd compile
PATH="$here/compile:/command:$PATH"
export PATH

. $here/compile/rts.tests 2>&1 | cat -v > $here/compile/rts.out
diff -w $here/compile/rts.out $here/compile/rts.exp
