diff options
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: |