]> mj.ucw.cz Git - eval.git/blob - mop/mo-create-submit
Linked mop/ to the build system.
[eval.git] / mop / mo-create-submit
1 #!/bin/bash
2
3 [ -f config ] || { echo "Missing config file, check cwd." ; exit 1 ; }
4 set -e
5 . config
6 [ -n "$REMOTE_SUBMIT" ] || { echo "Remote submit not enabled." ; exit 1 ; }
7
8 echo "Creating submit directory"
9
10 H=`pwd`
11 cd $MO_ROOT/eval/submit
12 mkdir -p certs
13 cp $H/certs/server* certs/
14 cp $H/certs/ca-cert.pem certs/
15
16 rm -rf submit
17 mkdir -p submit
18 cp $H/submit/{submitd,config,show-submits} submit/
19
20 mkdir -p solutions 
21 for a in `cd $H && bin/mo-get-users` ; do
22         mkdir -p solutions/$a
23 done
24
25 rm -rf lib
26 cp -a $H/submit/lib lib
27
28 rm -rf tmp
29 mkdir -p tmp
30
31 mkdir -p log history
32
33 chown -R $REMOTE_SUBMIT_USER.$REMOTE_SUBMIT_GROUP $MO_ROOT/eval/submit