]> mj.ucw.cz Git - moe.git/commitdiff
Use /bin/bash instead of /bin/sh in bang lines.
authorMartin Mares <mj@ucw.cz>
Wed, 16 May 2001 10:19:11 +0000 (10:19 +0000)
committerMartin Mares <mj@ucw.cz>
Wed, 16 May 2001 10:19:11 +0000 (10:19 +0000)
bin/ev
bin/mo-get-users [new file with mode: 0755]
bin/mo-grab
bin/mo-install

diff --git a/bin/ev b/bin/ev
index 0ddd6d365a8678299e7aca5794ca21b4a6025522..018f2370da93834ee26c209e4c250ec8235649d3 100755 (executable)
--- a/bin/ev
+++ b/bin/ev
@@ -1,3 +1,4 @@
+#!/bin/bash
 # The Evaluator -- Master Control Script
 # (c) 2001 Martin Mares <mj@ucw.cz>
 
diff --git a/bin/mo-get-users b/bin/mo-get-users
new file mode 100755 (executable)
index 0000000..e8a3d2c
--- /dev/null
@@ -0,0 +1,15 @@
+#!/bin/bash
+
+if [ "$1" = --help ] ; then
+       echo "Usage: mo-get-users [--full]"
+fi
+[ -f config ] || { echo "Missing config file, check cwd." ; exit 1 ; }
+set -e
+. config
+
+if [ "$1" = --full ] ; then
+       FORM='$1,"\t",$5'
+else
+       FORM='$1'
+fi
+awk -F: </etc/passwd "{ gsub(\",.*\",\"\",\$5); if (\$3 >= $CT_UID_MIN && \$3 <= $CT_UID_MAX) print $FORM; }"
index 87d0804c78cc6c9a8bd44b69fa06cfa0dff5ef9f..ef5a44a56d823872a0e9baedf5f37e25e53ac394 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
 
-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
index 60b4a0a5a4ed88feba0cb822bc850367a3a4d663..8fbb72977b23b652ec02673a391b73f5cc9b93e4 100755 (executable)
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
 
 [ -f config ] || { echo "Missing config file, check cwd." ; exit 1 ; }
 set -e