]> mj.ucw.cz Git - moe.git/blobdiff - mop/admin/mo-push-feedback.sh
Need to switch directory when reading configuration.
[moe.git] / mop / admin / mo-push-feedback.sh
index 403ed8b5d0e374e3d8aaf725f7a088f3c713827a..25c51468f0fafd36df50f1b16db35c400fcd6eee 100755 (executable)
@@ -1,10 +1,15 @@
 #!/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