diff options
author | Sérgio Almeida <mephx.x@gmail.com> | 2009-07-31 23:29:02 +0100 |
---|---|---|
committer | Sérgio Almeida <mephx.x@gmail.com> | 2009-07-31 23:29:02 +0100 |
commit | bf683ea4d54db55262dae3419729672b1933837f (patch) | |
tree | d19a9c4f4415b967a922ac9577b5c385b3523963 /uio.py | |
parent | Merge branch 'uselect' (diff) | |
download | uselect-bf683ea4d54db55262dae3419729672b1933837f.tar.gz uselect-bf683ea4d54db55262dae3419729672b1933837f.tar.bz2 uselect-bf683ea4d54db55262dae3419729672b1933837f.zip |
uprofile now uses PWD instead of HOME for profile storage
Diffstat (limited to 'uio.py')
-rw-r--r-- | uio.py | 10 |
1 files changed, 7 insertions, 3 deletions
@@ -35,13 +35,18 @@ class FileSystem: self.home = os.getenv('HOME') self.uid = pwd.getpwuid(os.getuid())[0] self.environment = self.home + '/.uselect/' + + def set_type(self, type): + if type == 'profile': + self.environment = './.uprofile/' + + def prepare_environment(self): if not os.path.exists(self.environment): os.mkdir(self.environment) if not os.path.exists(self.environment + 'bin/'): os.mkdir(self.environment + 'bin/') if not os.path.exists(self.environment + 'env.d/'): os.mkdir(self.environment + 'env.d/') - def get_env(self): env = [] for param in os.environ.keys(): @@ -307,8 +312,7 @@ class PrintSystem: [bold + '-nc', bullet + space + 'No Colors'], \ [bold + '-version', bullet + space + 'Version Information']]) - - + class ProfilePrintSystem(PrintSystem): def print_ui(self, profile = None, profiles = None, args = None, \ |