X-Git-Url: http://mj.ucw.cz/gitweb/?a=blobdiff_plain;f=public%2Fsubmit;h=ac73dbc32bf384858ec61628a35088487c20d871;hb=e42d87511230ff3bd287367a43564a95d0340079;hp=119ffcf2d43c6c53150fa316d8e9189412c40fda;hpb=56ae3e26009b276ed8931944a46a6b7eacd3d95c;p=eval.git diff --git a/public/submit b/public/submit index 119ffcf..ac73dbc 100755 --- a/public/submit +++ b/public/submit @@ -1,6 +1,6 @@ #!/bin/bash # The Evaluator -- Public Submit Script -# (c) 2001--2004 Martin Mares +# (c) 2001--2007 Martin Mares set -e [ -n "$MO_ROOT" -a -d "$MO_ROOT" ] || { echo >&2 "MO_ROOT not set, giving up." ; exit 1 ; } @@ -51,15 +51,15 @@ if [ $TASK_TYPE == open-data ] ; then [ -n "$PART" ] || die "You need to specify test number for open data problems." TEST=$PART pstart "Test case $TEST: " - open-locate $SRCFILE + open-locate "$SRCFILE" ( - ln $SRCN $TDIR/$TEST.out + ln "$SDIR/$SRCN" $TDIR/$TEST.out syntax-check test-result 1 OK ) || FAILED=1 else [ -z "$PART" ] || die "Test number should be given only for open data problems." - locate-source $SRCFILE + locate-source "$SRCFILE" compile for TEST in $SAMPLE_TESTS ; do ( @@ -85,7 +85,7 @@ fi if [ -n "$REMOTE_SUBMIT" ] ; then pstart "Submitting to the server... " - $MO_ROOT/bin/remote-submit $PROBLEM $PART $SDIR/$SRCN + $MO_ROOT/bin/remote-submit $PROBLEM $PART "$SDIR/$SRCN" pend "OK" exit 0 fi @@ -94,10 +94,10 @@ pstart "Submitting... " mkdir -p ~/.submit if [ $TASK_TYPE == open-data ] ; then mkdir -p ~/.submit/$PROBLEM - cp $SRCN ~/.submit/$PROBLEM/$PART.out + cp "$SDIR/$SRCN" ~/.submit/$PROBLEM/$PART.out else rm -rf ~/.submit/$PROBLEM mkdir -p ~/.submit/$PROBLEM - cp $SRCN ~/.submit/$PROBLEM/ + cp "$SDIR/$SRCN" ~/.submit/$PROBLEM/ fi pend "OK"