]> mj.ucw.cz Git - moe.git/blob - bin/mo-install
Copy only dotfiles from the template dir (not CVS/*).
[moe.git] / bin / mo-install
1 #!/bin/bash
2
3 [ -f config ] || { echo "Missing config file, check cwd." ; exit 1 ; }
4 set -e
5 . config
6 make
7
8 H=`pwd`
9
10 # mo-eval home
11 cd $MO_ROOT
12 rm -rf eval
13 mkdir eval
14 chgrp $EVAL_GROUP eval
15 chmod 550 eval
16 cd eval
17 echo "Creating $EVAL_USER"
18 mkdir $EVAL_USER
19 cd $EVAL_USER
20 cp -a $H/* .
21 mv bin/profile .profile
22 chmod +x bin/*
23 cd ..
24 chown -R $EVAL_USER.$EVAL_GROUP $EVAL_USER
25 chmod 700 $EVAL_USER
26
27 ( cd $EVAL_USER ; bin/mo-create-testusers )
28
29 # common
30 cd $MO_ROOT
31 echo "Creating public"
32 rm -rf public
33 mkdir public
34 cd public
35 cp -a $H/bin $H/config .
36 mkdir problems
37 cp -a $H/public/* bin/
38 chmod +x bin/*
39 cd ..
40 chown -R $EVAL_USER.$EVAL_GROUP public
41 chmod 755 public
42
43 # SSH keys (FIXME)
44 #echo "Copying SSH keys"
45 #mkdir $EVAL_USER/.ssh
46 #cp ~mj/.ssh/authorized_keys $EVAL_USER/.ssh/
47 #chown -R $EVAL_USER $EVAL_USER/.ssh