From eec2ea4fd9eb7017f864ad20852a41885cc864d7 Mon Sep 17 00:00:00 2001 From: Martin Mares Date: Wed, 18 Mar 2009 14:42:13 +0100 Subject: [PATCH] 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/. --- mop/public/check.sh | 6 ++++-- mop/public/compile.sh | 6 ++++-- mop/public/status.sh | 6 ++++-- mop/public/submit.sh | 6 ++++-- 4 files changed, 16 insertions(+), 8 deletions(-) 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 { -- 2.39.2