summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAaron Griffin <aaronmgriffin@gmail.com>2009-01-09 18:13:41 -0500
committerAaron Griffin <aaronmgriffin@gmail.com>2009-01-09 18:13:41 -0500
commit34dc23953ecf218cf263bf150ecb019dee36983d (patch)
treee6edf0386573166f31d12026682a0de5d135005a
parentd39b68ede8567fb2ee15f45995ddab8f4710e9dc (diff)
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 <aaronmgriffin@gmail.com>
-rw-r--r--db-functions5
1 files changed, 4 insertions, 1 deletions
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