]> mj.ucw.cz Git - eval.git/blob - mop/admin/mo-grab-remote.sh
Better logging of exceptions
[eval.git] / mop / admin / mo-grab-remote.sh
1 #!/bin/bash
2 # Grab all submits from the submit server and copy them to solutions/.
3
4 [ -n "$1" ] || { echo "Usage: mo-grab-remote <tasks>" ; exit 1 ; }
5 [ -f cf/mop ] || { echo "Missing config file, check cwd." ; exit 1 ; }
6 set -e
7 . cf/mop
8
9 for user in `bin/mo-get-users` ; do
10         echo -n "$user:"
11         mkdir -p solutions/$user
12         for t in $@ ; do
13                 rm -rf solutions/$user/$t
14                 D=$MO_ROOT/eval/submit/solutions/$user/$t
15                 if [ -d $D ] ; then
16                         echo -n " $t"
17                         cp -a $D solutions/$user/$t
18                 fi
19         done
20         echo
21 done