From c4a4efd0cb1f530fbccf81fc80470329051618eb Mon Sep 17 00:00:00 2001 From: Tomas Gavenciak Date: Wed, 21 May 2008 15:04:12 +0200 Subject: [PATCH] The dir-init function updated to use full paths by default. --- eval/libeval.sh | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/eval/libeval.sh b/eval/libeval.sh index 852bca8..bd3968b 100644 --- a/eval/libeval.sh +++ b/eval/libeval.sh @@ -111,11 +111,12 @@ function box-clean function dir-init { pstart "Initializing... " - HDIR=. - PDIR=problems/$PROBLEM - SDIR=solutions/$CONTESTANT/$PROBLEM - TDIR=testing/$CONTESTANT/$PROBLEM - TMPDIR=tmp + [ -z "$HDIR" ] && HDIR=`pwd` + PDIR=$HDIR/problems/$PROBLEM + SDIR=$HDIR/solutions/$CONTESTANT/$PROBLEM + TDIR=$HDIR/testing/$CONTESTANT/$PROBLEM + TMPDIR=$HDIR/tmp/ + [ -d $PDIR ] || die "Problem $PROBLEM not known" [ -d $SDIR ] || fatal "Solution of $PROBLEM not found" mkdir -p $TDIR $TMPDIR @@ -124,6 +125,7 @@ function dir-init cat >$TDIR/log <