]> mj.ucw.cz Git - eval.git/commitdiff
Split off mo-create-eval from mo-install.
authorMartin Mares <mj@ucw.cz>
Sun, 1 Jul 2007 21:10:33 +0000 (23:10 +0200)
committerMartin Mares <mj@ucw.cz>
Sun, 1 Jul 2007 21:10:33 +0000 (23:10 +0200)
bin/mo-create-eval [new file with mode: 0755]
bin/mo-install

diff --git a/bin/mo-create-eval b/bin/mo-create-eval
new file mode 100755 (executable)
index 0000000..9cc5ca0
--- /dev/null
@@ -0,0 +1,20 @@
+#!/bin/bash
+
+[ -f config ] || { echo "Missing config file, check cwd." ; exit 1 ; }
+set -e
+. config
+make
+
+H=`pwd`
+cd $MO_ROOT/eval
+
+echo "Creating $EVAL_USER"
+rm -rf eval
+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
+chmod 750 eval
index 8d7556c016678e80332946f2746a0b4e2a671568..88a0fc684910541d2225e05b3b4429895fc592df 100755 (executable)
@@ -16,15 +16,7 @@ chmod 755 eval
 cd eval
 
 # mo-eval home
-echo "Creating $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
-chmod 750 eval
+bin/mo-create-eval
 
 # testusers
 ( cd eval && bin/mo-create-testusers )