diff options
author | 2009-08-08 18:36:41 +0100 | |
---|---|---|
committer | 2009-08-08 18:36:41 +0100 | |
commit | 28c6f4aecc0b5f5f3c09aabe8edbeb633fad9de0 (patch) | |
tree | 90a2c61e9dfbb96a0051207063ff8e81d514fe5e /umodule.py | |
parent | tweaked uprofile's behaviour, minor bug fixing (diff) | |
download | uselect-28c6f4aecc0b5f5f3c09aabe8edbeb633fad9de0.tar.gz uselect-28c6f4aecc0b5f5f3c09aabe8edbeb633fad9de0.tar.bz2 uselect-28c6f4aecc0b5f5f3c09aabe8edbeb633fad9de0.zip |
started .uprofile/env.d/ .uselect/env.d/ capabilites
added sample ebuild
added sample .bashrc for automatic profile switching on a per-folder basis
Diffstat (limited to 'umodule.py')
-rw-r--r-- | umodule.py | 13 |
1 files changed, 9 insertions, 4 deletions
@@ -313,7 +313,7 @@ class Var(): """ string = '' for value in self.values: - string += value + separator + string += value[0] + separator return string @@ -347,12 +347,17 @@ class ProfileAction(Action): class Env(Action): def do_action(self, args): + lines = [] for var in self.vars: for value in var.values: if not value[1]: - self.usage.append(var.name) - for value in var.values: - self.usage.append(' ' + value[0]) + lines.append(var.name + '=' + var.to_string()) + self.usage.append(var.name + '=' + var.to_string()) + break + file = filesystem.environment + 'env.d/' + self.name + '.sh' + filesystem.delete_file(file) + filesystem.write_file(file, lines) + filesystem.make_exec_file(file) def get_var(self, name): """ |