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/.
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
{
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
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"
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
{