2 # The Evaluator -- Public Status Script
3 # (c) 2004 Martin Mares <mj@ucw.cz>
6 [ -n "$MO_ROOT" -a -d "$MO_ROOT" ] || { echo >&2 "MO_ROOT not set, giving up." ; exit 1 ; }
10 [ -z "$1" ] || die "Usage: status"
12 echo -e "Submitted tasks:\n"
14 if [ -n "$REMOTE_SUBMIT" ] ; then
15 exec $MO_ROOT/bin/remote-status
18 for PROBLEM in `cd $MO_ROOT/problems/ ; echo *` ; do
20 PDIR=$MO_ROOT/problems/$PROBLEM
21 SUBDIR=~/.submit/$PROBLEM
22 [ -f $PDIR/config ] || exit 0
25 if [ -d $SUBDIR ] ; then
26 if [ $TASK_TYPE == open-data ] ; then
28 [ -f $SUBDIR/$X.out ] && echo -n "$X " || echo -n "- "
33 for X in $EXTENSIONS ; do
34 if [ -f $SUBDIR/$PROBLEM.$X ] ; then
35 echo -n `basename $SUBDIR/$PROBLEM.$X`
41 elif [ $C == 1 ] ; then
44 echo "INCONSISTENT (you probably modified $SUBDIR manually)"