#!/bin/sh

# Run wrapper-script called from 'testcase_run.sh'.
# See that script for more info.
#
# Usage: $0 <testin> <progout> <program>...
#
# <testin>    File containing test-input.
# <progout>   File where to write solution output.
# <program>   Command and options of the program to be run.

TESTIN="$1";  shift
PROGOUT="$1"; shift

# Run the program while redirecting input/output.
# Note that "$@" expands to separate, quoted arguments.
exec "$@" < "$TESTIN" > "$PROGOUT"
