]> mj.ucw.cz Git - moe.git/blobdiff - bin/mo-install
Record local history in the GUI, too.
[moe.git] / bin / mo-install
index 8df71599790eb119a21a0b460cf07e46132432e5..8d7556c016678e80332946f2746a0b4e2a671568 100755 (executable)
@@ -7,34 +7,40 @@ make
 
 H=`pwd`
 
-# mo-eval home
+# The eval directory
 cd $MO_ROOT
 rm -rf eval
 mkdir eval
 chgrp $EVAL_GROUP eval
-chmod 550 eval
+chmod 755 eval
 cd eval
+
+# mo-eval home
 echo "Creating $EVAL_USER"
-mkdir $EVAL_USER
-cd $EVAL_USER
+mkdir eval
+cd eval
 cp -a $H/* .
 chmod +x bin/*
+if [ -d ~/.ssh ] ; then echo "Copying SSH configuration from ~/.ssh" ; cp -a ~/.ssh . ; fi
 cd ..
-chown -R $EVAL_USER.$EVAL_GROUP $EVAL_USER
-chmod 700 $EVAL_USER
+chown -R $EVAL_USER.$EVAL_GROUP eval
+chmod 750 eval
 
-( cd $EVAL_USER ; bin/mo-create-testusers )
+# testusers
+( cd eval && bin/mo-create-testusers )
 
-# common
+# mo-submit home
+if [ -n "$REMOTE_SUBMIT" ] ; then
+       mkdir submit
+       if [ -d ~/.ssh ] ; then echo "Copying SSH configuration from ~/.ssh" ; cp -a ~/.ssh submit/ ; fi
+       ( cd $H && bin/mo-create-submit )
+fi
+
+# create public
 cd $MO_ROOT
 echo "Creating public"
 rm -rf public
 mkdir public
-cd public
-cp -a $H/bin $H/config .
-mkdir problems
-cp -a $H/public/* bin/
-chmod +x bin/*
-cd ..
-chown -R $EVAL_USER.$EVAL_GROUP public
-chmod 755 public
+
+# populate public
+( cd eval/eval ; bin/mo-create-public )