]> mj.ucw.cz Git - eval.git/commitdiff
More fixes to installation scripts.
authorMartin Mares <mj@ucw.cz>
Sun, 10 Jun 2007 15:22:45 +0000 (17:22 +0200)
committerMartin Mares <mj@ucw.cz>
Sun, 10 Jun 2007 15:22:45 +0000 (17:22 +0200)
bin/mo-create-contestants
bin/mo-create-public
config

index f2dd8d27357c70612c7caa840f02450231c48779..3cc44454b8cc8d937756d948c29c336d8c94a827 100755 (executable)
@@ -15,7 +15,7 @@ for a in `cd $H && bin/mo-get-users` ; do
        mkdir $a $a/$a
        chown root.$a $a
        chmod 750 $a
-       cp -a `find $H/template -type f -name ".*"` $a/$a/
+       cp -a `find $H/template -mindepth 1 -maxdepth 1` $a/$a/
 
        if [ -n "$REMOTE_SUBMIT" ] ; then
                M=$a/$a/.mo
index deeca701c5915b3506f4b9acdee43162ac6d9c24..27889f595c031dbeb95b409dc0b101cbd714c451 100755 (executable)
@@ -9,7 +9,7 @@ H=`pwd`
 cd $MO_ROOT/public
 rm -rf bin submit
 
-sed 's/^TEST_USER=/#TEST_USER=/' <$H/config >config
+sed '/^\(TEST_USER\|MO_ROOT\)=/s/^/#/' <$H/config >config
 
 mkdir bin
 cp -a $H/public/[a-z]* bin/
@@ -18,11 +18,10 @@ for a in `cat $H/public/COPY` ; do
 done
 
 if [ -n "$REMOTE_SUBMIT" ] ; then
-       mkdir -p submit
        cp $H/submit/{contest,remote-submit,remote-status} bin/
-       mkdir -p submit/lib/perl5/{MO,Sherlock}
-       cp $H/submit/MO/*.pm submit/lib/perl5/MO/
-       cp $H/submit/lib/perl5/Sherlock/Object.pm submit/lib/perl5/Sherlock/
+       mkdir -p lib/perl5/{MO,Sherlock}
+       cp $H/submit/MO/*.pm lib/perl5/MO/
+       cp $H/submit/lib/perl5/Sherlock/Object.pm lib/perl5/Sherlock/
 fi
 
 mkdir -p problems
diff --git a/config b/config
index 83cdd0643ae6d7e863302c8e1735e40d25a90851..7b472e177a05d216f595d2504c1a14bbbcddc40f 100644 (file)
--- a/config
+++ b/config
@@ -2,9 +2,7 @@
 # (c) 2001--2007 Martin Mares <mj@ucw.cz>
 
 # The root of the whole directory hierarchy
-if [ -z "$MO_ROOT" ] ; then
-       MO_ROOT=/mo
-fi
+MO_ROOT=/mo
 
 # User and group used by the evaluator itself
 EVAL_USER=mo-eval