]> mj.ucw.cz Git - moe.git/blobdiff - mop/eval/mo-get-users.sh
Doc: Note that Isolate has moved
[moe.git] / mop / eval / mo-get-users.sh
index f85919ed8ec6b6d2c572465b1d93e0f294c40e96..172e5223589acc642a28b3f320dbed24cb5fd861 100755 (executable)
@@ -1,23 +1,15 @@
 #!/bin/bash
+# List all contestants according to $CT_USER_LIST
 
 if [ "$1" = --help ] ; then
        echo "Usage: mo-get-users [--full]"
 fi
-[ -f config ] || { echo "Missing config file, check cwd." ; exit 1 ; }
+[ -f cf/mop ] || { echo "Missing config file, check cwd." ; exit 1 ; }
 set -e
-. config
+. cf/mop
 
-if [ -z "$CT_USER_LIST" ] ; then
-       if [ "$1" = --full ] ; then
-               FORM='$1,$5'
-       else
-               FORM='$1'
-       fi
-       awk -F: </etc/passwd "{ gsub(\",.*\",\"\",\$5); OFS=\"\t\"; if (\$3 >= $CT_UID_MIN && \$3 <= $CT_UID_MAX) print $FORM; }"
+if [ "$1" = --full ] ; then
+       cut -d '        ' -f 1,2 <$CT_USER_LIST
 else
-       if [ "$1" = --full ] ; then
-               cut -d '        ' -f 1,2 <$CT_USER_LIST
-       else
-               cut -d '        ' -f 1 <$CT_USER_LIST
-       fi
+       cut -d '        ' -f 1 <$CT_USER_LIST
 fi