From: root Date: Mon, 29 Jun 2015 15:53:48 +0000 (+0200) Subject: MO-P: Public parts of /mo include templates X-Git-Url: http://mj.ucw.cz/gitweb/?a=commitdiff_plain;h=9fcd780fa33e62f56e9449837fdcbbb223e28d6c;p=moe.git MO-P: Public parts of /mo include templates --- diff --git a/mop/admin/mo-create-public.sh b/mop/admin/mo-create-public.sh index 184c2ae..a03d460 100644 --- a/mop/admin/mo-create-public.sh +++ b/mop/admin/mo-create-public.sh @@ -28,6 +28,3 @@ chmod +x bin/templater.pl cp -aL $M/project/templater templater mkdir -p problems - -chown -R root.root . -chmod -R go=rX . diff --git a/mop/admin/mo-upload-public.sh b/mop/admin/mo-upload-public.sh index 60d5f79..5a99999 100644 --- a/mop/admin/mo-upload-public.sh +++ b/mop/admin/mo-upload-public.sh @@ -5,6 +5,13 @@ [ -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) + +( + cd $MO_ROOT && + chown -R root.root public templates && + chmod -R go=rX public templates && + tar cavvf /export/public.tar.gz public templates +) + # 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 +bex add -i upload-public -s 'Upload /mo/public' -e "cd $MO_ROOT && rm -rf public templates && tar xavvf /nfs/export/public.tar.gz" contest -g diff --git a/mop/project/templater.pl b/mop/project/templater.pl index c745cfd..9362a45 100755 --- a/mop/project/templater.pl +++ b/mop/project/templater.pl @@ -6,7 +6,7 @@ use Gtk2 -init; my ($where,$taskdir,$home)=('/mo/public/templater/','/mo/templates/',$ENV{'HOME'}); my @tasks = map { s#.*/##; $_ } (glob "$taskdir/*"); -my $contestName = "MO-P"; +my $contestName = "CEOI"; sub create_template($$$$) { my ($path,$task,$name,$ext)=@_;