]> mj.ucw.cz Git - eval.git/commitdiff
Need to switch directory when reading configuration.
authorMartin Mares <mj@ucw.cz>
Wed, 18 Mar 2009 13:42:13 +0000 (14:42 +0100)
committerMartin Mares <mj@ucw.cz>
Wed, 18 Mar 2009 13:42:13 +0000 (14:42 +0100)
The reason is that cf/mop needs to include cf/eval, but it cannot
use absolute paths, because the config file is read both before and
after installation to $MO_ROOT/.

mop/public/check.sh
mop/public/compile.sh
mop/public/status.sh
mop/public/submit.sh

index 6a8012f2bcfefee60ab3c2c174d8cba91a867614..c82c174d2216834ac9d3fd95ea892bdb8d598d24 100755 (executable)
@@ -4,8 +4,10 @@
 
 set -e
 [ -n "$MO_ROOT" -a -d "$MO_ROOT" ] || { echo >&2 "MO_ROOT not set, giving up." ; exit 1 ; }
-. $MO_ROOT/bin/lib
-. $MO_ROOT/config
+pushd $MO_ROOT >/dev/null
+. lib/libeval.sh
+. cf/mop
+popd >/dev/null
 
 function usage
 {
index f96528f2a5bcb1eb813e9e233c4330b96017417f..c467dca0f058e8a416095b583c324ed23601fcfc 100755 (executable)
@@ -3,8 +3,10 @@
 
 set -e
 [ -n "$MO_ROOT" -a -d "$MO_ROOT" ] || { echo >&2 "MO_ROOT not set, giving up." ; exit 1 ; }
-. $MO_ROOT/bin/lib
-. $MO_ROOT/config
+pushd $MO_ROOT >/dev/null
+. lib/libeval.sh
+. cf/mop
+popd >/dev/null
 
 [ -n "$1" ] || die "Usage: compile (<problem> | <file> [<options>])"
 if [ "${1%%.*}" == "$1" ] ; then
index 9e795dc3c303f8e1415d07b19971c5adfc05e1cd..d225760506bbd2a7743fd68d60c178bd29525d66 100755 (executable)
@@ -4,8 +4,10 @@
 
 set -e
 [ -n "$MO_ROOT" -a -d "$MO_ROOT" ] || { echo >&2 "MO_ROOT not set, giving up." ; exit 1 ; }
-. $MO_ROOT/bin/lib
-. $MO_ROOT/config
+pushd $MO_ROOT >/dev/null
+. lib/libeval.sh
+. cf/mop
+popd >/dev/null
 
 [ -z "$1" ] || die "Usage: status"
 
index f597ee46b17eabf5ae1fdd5ab6067aeba06b3186..25b852bf69db81425028db73fa40309b4999ea7e 100755 (executable)
@@ -4,8 +4,10 @@
 
 set -e
 [ -n "$MO_ROOT" -a -d "$MO_ROOT" ] || { echo >&2 "MO_ROOT not set, giving up." ; exit 1 ; }
-. $MO_ROOT/bin/lib
-. $MO_ROOT/config
+pushd $MO_ROOT >/dev/null
+. lib/libeval.sh
+. cf/mop
+popd >/dev/null
 
 function usage
 {