From 34dc23953ecf218cf263bf150ecb019dee36983d Mon Sep 17 00:00:00 2001 From: Aaron Griffin Date: Fri, 9 Jan 2009 18:13:41 -0500 Subject: Add support for altername BASEDIRs in db-functions This is needed because we do lots of things via relative paths, and scripts in the misc-scripts dir may need some of these functions too Signed-off-by: Aaron Griffin --- db-functions | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'db-functions') diff --git a/db-functions b/db-functions index b196d57..a2e2f72 100644 --- a/db-functions +++ b/db-functions @@ -3,7 +3,10 @@ # Random integrity things [ "$UID" = "" ] && UID=$(uid) -BASEDIR="$(dirname $0)" +if [ -z "$BASEDIR" ]; then + BASEDIR="$(dirname $0)" +fi + if [ -f "$BASEDIR/config" ]; then . "$BASEDIR/config" fi -- cgit v1.2.3-24-g4f1b