]> mj.ucw.cz Git - eval.git/commitdiff
MO-P: mo-upload-public
authorroot <root@ceoi01.(none)>
Mon, 29 Jun 2015 15:34:23 +0000 (17:34 +0200)
committerroot <root@ceoi01.(none)>
Mon, 29 Jun 2015 15:34:23 +0000 (17:34 +0200)
mop/admin/Makefile
mop/admin/mo-create-public.sh
mop/admin/mo-upload-public.sh [new file with mode: 0644]

index 194e570ae456d91804e9f125e1a154fdf320e015..c166c3d70eabb8f322c0045feb5a9f826a4145af 100644 (file)
@@ -7,7 +7,7 @@ PROGS+=$(addprefix $(o)/mop/admin/,\
        mo-backup \
        mo-cms-users \
        mo-create-contestants mo-create-logins mo-create-public \
-       mo-upload-contestants mo-upload-logins mo-help-upload-logins \
+       mo-upload-contestants mo-upload-logins mo-help-upload-logins mo-upload-public \
        mo-get-users)
 
 $(o)/mop/admin/md5crypt: $(o)/mop/admin/md5crypt.o $(LIBUCW)
@@ -21,3 +21,4 @@ $(o)/mop/admin/mo-create-logins: $(s)/mop/admin/mo-create-logins.sh
 $(o)/mop/admin/mo-create-public: $(s)/mop/admin/mo-create-public.sh
 $(o)/mop/admin/mo-upload-contestants: $(s)/mop/admin/mo-upload-contestants.sh
 $(o)/mop/admin/mo-upload-logins: $(s)/mop/admin/mo-upload-logins.sh
+$(o)/mop/admin/mo-upload-public: $(s)/mop/admin/mo-upload-public.sh
index bd6aed4fd1dcb67791544b7942fa40feeeeff8bb..184c2ae1ed5c4b02336fe7affef33e798941d8af 100644 (file)
@@ -30,4 +30,4 @@ cp -aL $M/project/templater templater
 mkdir -p problems
 
 chown -R root.root .
-chmod -R go=rwX .
+chmod -R go=rX .
diff --git a/mop/admin/mo-upload-public.sh b/mop/admin/mo-upload-public.sh
new file mode 100644 (file)
index 0000000..60d5f79
--- /dev/null
@@ -0,0 +1,10 @@
+#!/bin/sh
+# Upload /mo/public
+# Assumes that /nfs/export at workstations points to /export of the caller
+
+[ -f cf/mop ] || { echo "Missing config file, check cwd." ; exit 1 ; }
+set -e
+. cf/mop
+( cd $MO_ROOT && tar cavvf /export/public.tar.gz public)
+# XXX: Beware of quoting!
+bex add -i upload-public -s 'Upload /mo/public' -e "cd $MO_ROOT && rm -rf public && tar xavvf /nfs/export/public.tar.gz" contest -g