]> mj.ucw.cz Git - moe.git/commitdiff
Manual override of solution to test.
authorMartin Mares <mj@ucw.cz>
Sun, 3 Jun 2001 18:30:14 +0000 (18:30 +0000)
committerMartin Mares <mj@ucw.cz>
Sun, 3 Jun 2001 18:30:14 +0000 (18:30 +0000)
bin/ev
bin/lib

diff --git a/bin/ev b/bin/ev
index 018f2370da93834ee26c209e4c250ec8235649d3..4846c9fd1331d64f3d8f74634157181dc0f1fe77 100755 (executable)
--- a/bin/ev
+++ b/bin/ev
@@ -17,7 +17,7 @@ fi
 #   BOXDIR     sandbox
 #   PROBLEM    problem we're evaluating
 
-[ -n "$2" ] || die "Usage: ev <contestant> <problem>"
+[ -n "$2" ] || die "Usage: ev <contestant> <problem> [<program>]"
 CONTESTANT=$1
 PROBLEM=$2
 dir-init
@@ -26,7 +26,7 @@ log-init
 box-init
 
 # Compile the program
-locate-source
+locate-source $3
 compile
 
 # Perform the tests
diff --git a/bin/lib b/bin/lib
index 27ea9b428420de5da78fe85cb20b1e007c451766..aa7b4cfff04b88da71420a6d4910033cd0c1fe08 100644 (file)
--- a/bin/lib
+++ b/bin/lib
@@ -94,10 +94,11 @@ EOF
 function locate-source
 {
        pstart "Finding source... "
+       SBASE=${1:-$PROBLEM}
        for a in $EXTENSIONS ; do
-               if [ -f $SDIR/$PROBLEM.$a ] ; then
+               if [ -f $SDIR/$SBASE.$a ] ; then
                        [ -z "$SRCN" ] || die "Multiple source files found: $SDIR/$PROBLEM.$a and $SDIR/$SRCN. Please fix."
-                       SRCN=$PROBLEM.$a
+                       SRCN=$SBASE.$a
                        SRCEXT=$a
                fi
        done