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 ; }
7 pushd $MO_ROOT >/dev/null
12 [ -z "$1" ] || die "Usage: status"
14 echo -e "Submitted tasks:\n"
16 if [ -n "$REMOTE_SUBMIT" ] ; then
17 exec $MO_ROOT/bin/remote-status
20 for PROBLEM in `cd $MO_ROOT/problems/ ; echo *` ; do
22 PDIR=$MO_ROOT/problems/$PROBLEM
23 SUBDIR=~/.submit/$PROBLEM
24 [ -f $PDIR/config ] || exit 0
27 if [ -d $SUBDIR ] ; then
28 if [ $TASK_TYPE == open-data ] ; then
30 [ -f $SUBDIR/$X.out ] && echo -n "$X " || echo -n "- "
35 for X in $EXTENSIONS ; do
36 if [ -f $SUBDIR/$PROBLEM.$X ] ; then
37 echo -n `basename $SUBDIR/$PROBLEM.$X`
43 elif [ $C == 1 ] ; then
46 echo "INCONSISTENT (you probably modified $SUBDIR manually)"