]> mj.ucw.cz Git - moe.git/commitdiff
Added...
authorMartin Mares <mj@ucw.cz>
Tue, 3 Apr 2001 17:52:41 +0000 (17:52 +0000)
committerMartin Mares <mj@ucw.cz>
Tue, 3 Apr 2001 17:52:41 +0000 (17:52 +0000)
bin/mo-grab [new file with mode: 0755]
bin/profile

diff --git a/bin/mo-grab b/bin/mo-grab
new file mode 100755 (executable)
index 0000000..bfb3fce
--- /dev/null
@@ -0,0 +1,24 @@
+#!/bin/sh
+
+[ -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
+       echo -n "$user:"
+       H=`eval echo ~$user`/.submit
+       if [ -d $H ] ; then
+               [ -d solutions/$user ] || mkdir -p solutions/$user
+               for t in $@ ; do
+                       rm -rf solutions/$user/$t
+                       if [ -d $H/$t ] ; then
+                               echo -n " $t"
+                               cp -dr $H/$t solutions/$user/$t
+                       fi
+               done
+               echo
+       else
+               echo " No .submit directory"
+       fi
+done
index 404cecb04aecda0d4bb60c6730a5a5da2854e492..e55842a6c92098279e1554ebb88c7aba2c17b94f 100644 (file)
@@ -6,7 +6,7 @@ PATH="$PATH:~/bin"
 #read TEST_USER
 
 # FIXME
-echo "Setting TEST_USER=mo-test1"
-TEST_USER=mo-test1
+#echo "Setting TEST_USER=mo-test1"
+#TEST_USER=mo-test1
 
 export TEST_USER