]> mj.ucw.cz Git - moe.git/blobdiff - bin/mo-install
Improved formatting of login tickets.
[moe.git] / bin / mo-install
index 966c3fdef487fbd73065ff81b7cfa741a13a668f..2c0e8bd6360bd6ba96cf9c1971ad25a209370b6d 100755 (executable)
@@ -7,41 +7,33 @@ 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
-echo "Creating $EVAL_USER"
-mkdir $EVAL_USER
-cd $EVAL_USER
-cp -a $H/* .
-mv bin/profile .profile
-chmod +x bin/*
-cd ..
-chown -R $EVAL_USER.$EVAL_GROUP $EVAL_USER
-chmod 700 $EVAL_USER
-
-( cd $EVAL_USER ; bin/mo-create-testusers )
-
-# common
+
+# mo-eval home
+bin/mo-create-eval
+
+# testusers
+( cd eval && bin/mo-create-testusers )
+
+# mo-submit home
+if [ -n "$REMOTE_SUBMIT" ] ; then
+       mkdir submit
+       chmod 750 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
-
-# SSH keys (FIXME)
-#echo "Copying SSH keys"
-#mkdir $EVAL_USER/.ssh
-#cp ~mj/.ssh/authorized_keys $EVAL_USER/.ssh/
-#chown -R $EVAL_USER $EVAL_USER/.ssh
+
+# populate public
+( cd eval/eval ; bin/mo-create-public )