]> mj.ucw.cz Git - eval.git/commitdiff
mo-upload-skeleton
authorMO Root <root@mo>
Thu, 30 Mar 2017 10:19:10 +0000 (12:19 +0200)
committerMO Root <root@mo>
Thu, 30 Mar 2017 10:19:10 +0000 (12:19 +0200)
mop/admin/mo-upload-skeleton.sh [new file with mode: 0644]

diff --git a/mop/admin/mo-upload-skeleton.sh b/mop/admin/mo-upload-skeleton.sh
new file mode 100644 (file)
index 0000000..b97ae17
--- /dev/null
@@ -0,0 +1,18 @@
+#!/bin/sh
+# Upload /mo skeleton
+# 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
+DIRS="desktop documentation problems public"
+
+(
+       cd $MO_ROOT &&
+       chown -R root.root $DIRS &&
+       chmod -R go=rX $DIRS &&
+       tar cavvf /export/skeleton.tar.gz $DIRS
+)
+
+# XXX: Beware of quoting!
+bex add -i upload-public -s 'Upload /mo/public' -e "rm -rf $MO_ROOT && mkdir $MO_ROOT && cd $MO_ROOT && tar xavvf /nfs/export/skeleton.tar.gz" contest -g