From 308a44ae11648afb6c20a2ececf01461c469f7f0 Mon Sep 17 00:00:00 2001 From: Martin Mares Date: Tue, 3 Apr 2001 17:52:41 +0000 Subject: [PATCH] Added... --- bin/mo-grab | 24 ++++++++++++++++++++++++ bin/profile | 4 ++-- 2 files changed, 26 insertions(+), 2 deletions(-) create mode 100755 bin/mo-grab diff --git a/bin/mo-grab b/bin/mo-grab new file mode 100755 index 0000000..bfb3fce --- /dev/null +++ b/bin/mo-grab @@ -0,0 +1,24 @@ +#!/bin/sh + +[ -n "$1" ] || { echo "Usage: mo-grab " ; exit 1 ; } +[ -f config ] || { echo "Missing config file, check cwd." ; exit 1 ; } +set -e +. config + +for user in `awk -F: = 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 diff --git a/bin/profile b/bin/profile index 404cecb..e55842a 100644 --- a/bin/profile +++ b/bin/profile @@ -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 -- 2.39.5