]> mj.ucw.cz Git - eval.git/blob - mop/admin/mo-back-status.sh
Dereference links when installing.
[eval.git] / mop / admin / mo-back-status.sh
1 #!/bin/sh
2 # Find all submits in the local copy of contestants' home directories
3 # (as created by mo-backup) and print their status.
4
5 if [ -z "$1" ] ; then
6         echo "Directory name expected"
7         exit 1
8 fi
9 for m in `cd $1 ; echo *` ; do
10         echo -n "$m:"
11         for d in $1/$m/mo??/mo?? ; do
12                 u=`basename $d`
13                 if [ $u != mo00 -a `ls $d | wc -l` -gt 0 ] ; then
14                         echo -n " $u"
15                         if [ -d $d/.submit ] ; then
16                                 echo -n '('
17                                 ( cd $d/.submit ; echo -n * )
18                                 echo -n ')'
19                         fi
20                 fi
21         done
22         echo
23 done