]> mj.ucw.cz Git - eval.git/blob - public/compile
Added public scripts.
[eval.git] / public / compile
1 # The Evaluator -- Public Compilation Script
2 # (c) 2001 Martin Mares <mj@ucw.cz>
3
4 set -e
5 [ -n "$MO_PUBLIC" -a -d "$MO_PUBLIC" ] || { echo >&2 "MO_PUBLIC not set, giving up." ; exit 1 ; }
6 . $MO_PUBLIC/bin/lib
7 . $MO_PUBLIC/config
8
9 [ -n "$1" ] || die "Usage: compile <problem>"
10 PROBLEM=$1
11 public-setup
12 . $PDIR/config
13 locate-source
14 if compile ; then
15         mv $TDIR/$PROBLEM .
16 else
17         echo >&2
18         sed <log >&2 '1,/^Compiler output:/d;/^Compiler output files:/,$d;/^Exited /d'
19 fi