summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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