diff options
author | Marco Pesenti Gritti <marco@localhost.localdomain> | 2006-07-19 11:38:24 (GMT) |
---|---|---|
committer | Marco Pesenti Gritti <marco@localhost.localdomain> | 2006-07-19 11:38:24 (GMT) |
commit | ae00121fbffdb3434d79716a112bd5956b9e5e67 (patch) | |
tree | ba65fb39de00da7ae25c2f0e56a45877b9f371fe /shell/sugar | |
parent | 08a52809a6ae3c712d67a9b50f10821ab5225e48 (diff) |
Use matchbox to activate home and people page
Diffstat (limited to 'shell/sugar')
-rwxr-xr-x | shell/sugar | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/shell/sugar b/shell/sugar index 756fe26..cff3c11 100755 --- a/shell/sugar +++ b/shell/sugar @@ -5,6 +5,13 @@ import os import pwd import random +def add_to_bin_path(path): + if os.environ.has_key('PATH'): + old_path = os.environ['PATH'] + os.environ['PATH'] = path + ':' + old_path + else: + os.environ['PATH'] = path + def add_to_python_path(path): sys.path.insert(0, path) if os.environ.has_key('PYTHONPATH'): @@ -34,6 +41,7 @@ basedir = os.path.dirname(curdir) if os.path.isfile(os.path.join(basedir, 'sugar/__uninstalled__.py')): print 'Running sugar from ' + basedir + ' ...' + add_to_bin_path(os.path.join(basedir, 'shell')) add_to_python_path(basedir) add_to_python_path(os.path.join(basedir, 'shell')) else: |