Add a SUGAR_HOME environment variable
We should really use XDG directories but that will be a bit more complicated and require migration scripts. This is a short time solution to "expose" the dot sugar directory in sugar-build.
This commit is contained in:
parent
e908aeb8ca
commit
fe192be798
@ -32,7 +32,8 @@ def is_emulator():
|
||||
|
||||
def get_profile_path(path=None):
|
||||
profile_id = os.environ.get('SUGAR_PROFILE', 'default')
|
||||
base = os.path.join(os.path.expanduser('~/.sugar'), profile_id)
|
||||
home_dir = os.environ.get('SUGAR_HOME', os.path.expanduser('~/.sugar'))
|
||||
base = os.path.join(home_dir, profile_id)
|
||||
if not os.path.isdir(base):
|
||||
try:
|
||||
os.makedirs(base, 0770)
|
||||
|
Loading…
Reference in New Issue
Block a user