#!/bin/sh
+# Find all submits in the local copy of contestants' home directories
+# (as created by mo-backup) and copy them to solutions/.
+
if [ -z "$1" ] ; then
echo "Directory name expected"
exit 1
#!/bin/sh
+# Find all submits in the local copy of contestants' home directories
+# (as created by mo-backup) and print their status.
+
if [ -z "$1" ] ; then
echo "Directory name expected"
exit 1
#!/bin/sh
+# A trivial script to back up contestants' home directories.
+
if [ -z "$1" ] ; then
D=back/`date '+%H%M'`
else
#!/bin/bash
+# Grab all submits from the submit server and copy them to solutions/.
[ -n "$1" ] || { echo "Usage: mo-grab-remote <tasks>" ; exit 1 ; }
[ -f config ] || { echo "Missing config file, check cwd." ; exit 1 ; }
#!/bin/bash
+# Grab all submits from contestants' home directories located on the
+# local machine and copy them to solutions/.
[ -n "$1" ] || { echo "Usage: mo-grab <tasks>" ; exit 1 ; }
[ -f config ] || { echo "Missing config file, check cwd." ; exit 1 ; }
#!/bin/bash
-[ -f config ] || { echo "Missing config file, check cwd." ; exit 1 ; }
+# Copy submit certificates to contestants' machines. Each machine gets
+# only the certs of the contestants who should use it.
+
+[ -f cf/mop ] || { echo "Missing config file, check cwd." ; exit 1 ; }
set -e
-. config
+. cf/mop
while IFS=" " read LOGIN FULL MACH ; do
if [ -z "$1" -o "$1" == "$LOGIN" ] ; then
echo "$LOGIN -> $MACH"
- D=/mo/users/$LOGIN/$LOGIN/
+ D=$MO_ROOT/users/$LOGIN/$LOGIN/
rsync -av $D/.mo root@$MACH:$D/
fi </dev/null
-done <userlist
+done <$CT_USER_LIST
#!/bin/bash
+# Distribute testing results (testing/$USER) to contestants' machines.
+
+[ -f cf/mop ] || { echo "Missing config file, check cwd." ; exit 1 ; }
set -e
+. cf/mop
+
while IFS=" " read LOGIN FULL MACH ; do
if [ -z "$1" -o "$1" == "$LOGIN" ] ; then
echo "$LOGIN -> $MACH"
- D=/mo/users/$LOGIN/$LOGIN/
+ D=$MO_ROOT/users/$LOGIN/$LOGIN/
rsync -av ~mo-eval/testing/$LOGIN root@$MACH:$D/results
ssh root@$MACH "cd $D && chown -R $LOGIN.$LOGIN results"
fi </dev/null
-done <userlist
+done <$CT_USER_LIST