]> mj.ucw.cz Git - eval.git/blobdiff - bin/mo-grab
The first bits of the contest GUI.
[eval.git] / bin / mo-grab
index bfb3fceaaa5657fcbf0dc377846a5f9e7215fd84..9ce2f19139914fe301dce166dc7dbb6665ca74c9 100755 (executable)
@@ -1,11 +1,11 @@
-#!/bin/sh
+#!/bin/bash
 
 [ -n "$1" ] || { echo "Usage: mo-grab <tasks>" ; exit 1 ; }
 [ -f config ] || { echo "Missing config file, check cwd." ; exit 1 ; }
 set -e
 . config
 
 
 [ -n "$1" ] || { echo "Usage: mo-grab <tasks>" ; exit 1 ; }
 [ -f config ] || { echo "Missing config file, check cwd." ; exit 1 ; }
 set -e
 . config
 
-for user in `awk -F: </etc/passwd '{ if ($3 >= 21000 && $3 < 30000) print $1; }'` ; do
+for user in `bin/mo-get-users` ; do
        echo -n "$user:"
        H=`eval echo ~$user`/.submit
        if [ -d $H ] ; then
        echo -n "$user:"
        H=`eval echo ~$user`/.submit
        if [ -d $H ] ; then
@@ -19,6 +19,8 @@ for user in `awk -F: </etc/passwd '{ if ($3 >= 21000 && $3 < 30000) print $1; }'
                done
                echo
        else
                done
                echo
        else
-               echo " No .submit directory"
+               echo " ---"
        fi
 done
        fi
 done
+chown -R $EVAL_USER solutions
+chmod -R a+r solutions