summaryrefslogtreecommitdiff
path: root/uio.py
diff options
context:
space:
mode:
authorSérgio Almeida <mephx.x@gmail.com>2009-08-17 16:45:58 +0100
committerSérgio Almeida <mephx.x@gmail.com>2009-08-17 16:45:58 +0100
commit0bc662a176b7044fd6faba7fabb68f7abe9a2049 (patch)
tree9b5039006db998c53efdb4fab53efd26f5ee5f48 /uio.py
parentAdded support for targetless links aka *.d/ alike links (diff)
downloaduselect-0bc662a176b7044fd6faba7fabb68f7abe9a2049.tar.gz
uselect-0bc662a176b7044fd6faba7fabb68f7abe9a2049.tar.bz2
uselect-0bc662a176b7044fd6faba7fabb68f7abe9a2049.zip
Added -global when root. Fixed broken global lynking
Diffstat (limited to 'uio.py')
-rw-r--r--uio.py9
1 files changed, 7 insertions, 2 deletions
diff --git a/uio.py b/uio.py
index f0d9423..4f1a85c 100644
--- a/uio.py
+++ b/uio.py
@@ -20,6 +20,7 @@ bold = lime = red = reset = yellow = notice = ''
error = warning = bullet = ok = highlight = ''
verbose = False
+
class Counter:
def __init__(self):
@@ -31,6 +32,7 @@ class FileSystem:
def __init__(self):
""" FileSystem Contructor """
self.home = os.getenv('HOME')
+ self.set_global = False
self.uid = pwd.getpwuid(os.getuid())[0]
self.environment = self.home + '/.uselect/'
@@ -309,10 +311,13 @@ class PrintSystem:
def print_options(self):
self.print_line(highlight + space + 'Options:' + reset)
- self.print_table([ \
+ table = [\
[bold + '-v', bullet + space + 'Verbose Mode'], \
[bold + '-nc', bullet + space + 'No Colors'], \
- [bold + '-version', bullet + space + 'Version Information']])
+ [bold + '-version', bullet + space + 'Version Information']]
+ if filesystem.uid == 'root':
+ table.append([bold + '-global', bullet + space + 'Set Globally'])
+ self.print_table(table)
class ProfilePrintSystem(PrintSystem):