From: Martin Mares Date: Wed, 18 Mar 2009 13:42:13 +0000 (+0100) Subject: Need to switch directory when reading configuration. X-Git-Tag: python-dummy-working~114 X-Git-Url: http://mj.ucw.cz/gitweb/?a=commitdiff_plain;h=eec2ea4fd9eb7017f864ad20852a41885cc864d7;p=eval.git Need to switch directory when reading configuration. 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/. --- diff --git a/mop/public/check.sh b/mop/public/check.sh index 6a8012f..c82c174 100755 --- a/mop/public/check.sh +++ b/mop/public/check.sh @@ -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 { diff --git a/mop/public/compile.sh b/mop/public/compile.sh index f96528f..c467dca 100755 --- a/mop/public/compile.sh +++ b/mop/public/compile.sh @@ -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 ( | [])" if [ "${1%%.*}" == "$1" ] ; then diff --git a/mop/public/status.sh b/mop/public/status.sh index 9e795dc..d225760 100755 --- a/mop/public/status.sh +++ b/mop/public/status.sh @@ -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" diff --git a/mop/public/submit.sh b/mop/public/submit.sh index f597ee4..25b852b 100755 --- a/mop/public/submit.sh +++ b/mop/public/submit.sh @@ -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 {