diff options
author | Simon 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) |
commit | 94bfe293851dbdc3ab1b058f24f7e5cf795a6893 (patch) | |
tree | 87a38ed6777c4cc7767dc16aed46cfe2120da390 /bin | |
parent | 4fdb5daa6f6a6edfbc702589b9326c91c231afd1 (diff) |
bin/datastore-service: respect $SUGAR_PROFILE, allowing multiple instances
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/datastore-service | 3 |
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 |