From 833c133e1a1b1b8fe78cb8accd794efd2b485a16 Mon Sep 17 00:00:00 2001 From: root Date: Mon, 29 Jun 2015 17:16:52 +0200 Subject: [PATCH] MO-P: mo-upload-contestants --- mop/admin/Makefile | 3 ++- mop/admin/mo-upload-contestants.sh | 9 +++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) create mode 100644 mop/admin/mo-upload-contestants.sh diff --git a/mop/admin/Makefile b/mop/admin/Makefile index 6a8a9cb..194e570 100644 --- a/mop/admin/Makefile +++ b/mop/admin/Makefile @@ -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-logins mo-help-upload-logins \ + mo-upload-contestants mo-upload-logins mo-help-upload-logins \ mo-get-users) $(o)/mop/admin/md5crypt: $(o)/mop/admin/md5crypt.o $(LIBUCW) @@ -19,4 +19,5 @@ $(o)/mop/admin/mo-help-upload-logins: $(s)/mop/admin/mo-help-upload-logins.pl $(o)/mop/admin/mo-create-contestants: $(s)/mop/admin/mo-create-contestants.sh $(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 diff --git a/mop/admin/mo-upload-contestants.sh b/mop/admin/mo-upload-contestants.sh new file mode 100644 index 0000000..64fe133 --- /dev/null +++ b/mop/admin/mo-upload-contestants.sh @@ -0,0 +1,9 @@ +#!/bin/sh +# Upload home directories of contestants +# Assumes that /nfs/export at workstations points to /export of the caller + +set -e +. cf/mop +( cd $MO_ROOT && tar cavvf /export/users.tar.gz users) +# XXX: Beware of quoting! +bex add -i upload-contestants -s 'Upload home directories of contestants' -e "cd $MO_ROOT && rm -rf users && tar xavvf /nfs/export/users.tar.gz" contest -g -- 2.39.5