From: MO Root Date: Thu, 30 Mar 2017 10:19:10 +0000 (+0200) Subject: mo-upload-skeleton X-Git-Url: http://mj.ucw.cz/gitweb/?a=commitdiff_plain;h=95c44a7c2d512c240e46705d814c2fa7372f1029;p=eval.git mo-upload-skeleton --- diff --git a/mop/admin/mo-upload-skeleton.sh b/mop/admin/mo-upload-skeleton.sh new file mode 100644 index 0000000..b97ae17 --- /dev/null +++ b/mop/admin/mo-upload-skeleton.sh @@ -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