From f0a0c5d9c205ae0b41e8a1feaecb74adf5155bef Mon Sep 17 00:00:00 2001 From: Martin Mares Date: Sat, 5 Jun 2004 14:33:38 +0000 Subject: [PATCH] Created mo-create-public. --- bin/mo-create-public | 25 +++++++++++++++++++++++++ public/COPY | 3 +++ 2 files changed, 28 insertions(+) create mode 100755 bin/mo-create-public create mode 100755 public/COPY diff --git a/bin/mo-create-public b/bin/mo-create-public new file mode 100755 index 0000000..24766fd --- /dev/null +++ b/bin/mo-create-public @@ -0,0 +1,25 @@ +#!/bin/bash + +[ -f config ] || { echo "Missing config file, check cwd." ; exit 1 ; } +set -e +. config + +echo "Populating $MO_ROOT/public" +H=`pwd` +cd $MO_ROOT/public +rm -rf bin + +sed 's/^TEST_USER=/#TEST_USER=/' <$H/config >config + +mkdir bin +cp -a $H/public/[a-z]* bin/ +for a in `cat $H/public/COPY` ; do + cp -a $H/$a bin/ +done + +mkdir -p problems + +if [ `id -u` == 0 ] ; then + chown -R $EVAL_USER.$EVAL_GROUP . + chmod 755 . +fi diff --git a/public/COPY b/public/COPY new file mode 100755 index 0000000..82d9bb8 --- /dev/null +++ b/public/COPY @@ -0,0 +1,3 @@ +bin/lib +bin/box +bin/iwrapper -- 2.39.5