Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
authorSimon McVittie <simon.mcvittie@collabora.co.uk>2007-05-17 12:23:00 (GMT)
committer Simon McVittie <simon.mcvittie@collabora.co.uk>2007-05-17 12:23:00 (GMT)
commit94bfe293851dbdc3ab1b058f24f7e5cf795a6893 (patch)
tree87a38ed6777c4cc7767dc16aed46cfe2120da390 /bin
parent4fdb5daa6f6a6edfbc702589b9326c91c231afd1 (diff)
bin/datastore-service: respect $SUGAR_PROFILE, allowing multiple instances
Diffstat (limited to 'bin')
-rwxr-xr-xbin/datastore-service3
1 files changed, 2 insertions, 1 deletions
diff --git a/bin/datastore-service b/bin/datastore-service
index e2a96d9..cad9fc4 100755
--- a/bin/datastore-service
+++ b/bin/datastore-service
@@ -7,7 +7,8 @@ from olpc.datastore import DataStore, DS_LOG_CHANNEL
import logging
# Path handling
-base_dir = os.path.expanduser("~/.sugar/default")
+profile = os.environ.get('SUGAR_PROFILE', 'default')
+base_dir = os.path.join(os.path.expanduser('~'), '.sugar', profile)
repo_dir = os.path.join(base_dir, 'datastore')
db_dir = "sqlite:///%s/datastore.db" % repo_dir