1 # The Evaluator -- Public Submit Script
2 # (c) 2001 Martin Mares <mj@ucw.cz>
5 [ -n "$MO_PUBLIC" -a -d "$MO_PUBLIC" ] || { echo >&2 "MO_PUBLIC not set, giving up." ; exit 1 ; }
10 if [ "$1" = --force ] ; then
14 [ -n "$1" -o "$1" = "--help" ] || die "Usage: submit [--force] <problem>"
22 for TEST in $SAMPLE_TESTS ; do
23 pstart "Checking on sample input $TEST: "
24 if test-run && syntax-check ; then
30 pstart "Submiting... "
31 if [ $FAILED != 0 ] ; then
32 if [ $FORCE != 0 ] ; then
33 pcont "(tests failed, but --force given) "
35 pend "TESTS FAILED Use submit --force if you really want to submit a wrong solution."
40 rm -rf ~/.submit/$PROBLEM
41 mkdir ~/.submit/$PROBLEM
42 cp $SRCN ~/.submit/$PROBLEM/