]> mj.ucw.cz Git - eval.git/commitdiff
Clean up backup, grab and push scripts.
authorMartin Mares <mj@ucw.cz>
Sun, 25 May 2008 21:06:23 +0000 (23:06 +0200)
committerMartin Mares <mj@ucw.cz>
Sun, 25 May 2008 21:06:23 +0000 (23:06 +0200)
mop/admin/mo-back-grab.sh
mop/admin/mo-back-status.sh
mop/admin/mo-backup.sh
mop/admin/mo-grab-remote.sh
mop/admin/mo-grab.sh
mop/admin/mo-push-certs.sh
mop/admin/mo-push-feedback.sh

index 5628034e6d0dd381a9830ecdcc19f6cddafbfdbb..5fa7181bde7158bbebe9c2e12524baf4158c683c 100755 (executable)
@@ -1,4 +1,7 @@
 #!/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
index e3eecc69c36846056d80f4196eb02f0d18e760d4..1a51fb5e02ad74eb7b3de98cd38ab5dac7969a25 100755 (executable)
@@ -1,4 +1,7 @@
 #!/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
index 00b13f8e9a28902c61d6409b77f7d838bf55fb0a..834ca9a33c8b9b0661190208b46fca42b5e0dac9 100755 (executable)
@@ -1,4 +1,6 @@
 #!/bin/sh
+# A trivial script to back up contestants' home directories.
+
 if [ -z "$1" ] ; then
        D=back/`date '+%H%M'`
 else
index 6181b4e25b9d78988ca126fbe3ec3f69a6ecd8b3..eff0ec05d9d8dfe671982a21e9cf714eed186b4d 100755 (executable)
@@ -1,4 +1,5 @@
 #!/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 ; }
index 9ce2f19139914fe301dce166dc7dbb6665ca74c9..ad57520bd90d66b25d3198e031a9ee76f78bc5de 100755 (executable)
@@ -1,4 +1,6 @@
 #!/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 ; }
index 54b84ba671e0c7abf8118cd857260bebfeae863e..55a3fd3730ab221032c580b6bf77c0f726558584 100755 (executable)
@@ -1,12 +1,15 @@
 #!/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
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