summaryrefslogtreecommitdiff
path: root/portato.py
diff options
context:
space:
mode:
authornecoro <>2007-06-15 13:26:33 +0000
committernecoro <>2007-06-15 13:26:33 +0000
commit7a87171db82eb2bd4b46dc1077e04dfcba2c7393 (patch)
treeb6d4e9edc38f8f1bf2a471d1987983175a141994 /portato.py
parentfdb59c4e6f967c0c133f2aba1fb0c290d1e05f5b (diff)
downloadportato-7a87171db82eb2bd4b46dc1077e04dfcba2c7393.tar.gz
portato-7a87171db82eb2bd4b46dc1077e04dfcba2c7393.tar.bz2
portato-7a87171db82eb2bd4b46dc1077e04dfcba2c7393.zip
added ability of passing "&&" to the sync command
Diffstat (limited to 'portato.py')
-rwxr-xr-xportato.py23
1 files changed, 17 insertions, 6 deletions
diff --git a/portato.py b/portato.py
index 3a81dec..08d7123 100755
--- a/portato.py
+++ b/portato.py
@@ -17,6 +17,8 @@ import sys
def main ():
uimod = STD_FRONTEND
+ do_ebuild = False
+ ebuild_pkg = None
for arg in sys.argv[1:]:
if arg in ("--help","--version","-h","-v"):
@@ -29,18 +31,24 @@ There is NO WARRANTY, to the extent permitted by law.
Written by René 'Necoro' Neumann <necoro@necoro.net>""" % VERSION
sys.exit(0)
- if arg == "--check": # run pychecker
+ elif arg == "--check": # run pychecker
import os
os.environ['PYCHECKER'] = "--limit 50"
import pychecker.checker
- continue
- uimod = arg
- break
+ elif arg in ("--ebuild", "-e"):
+ do_ebuild = True
+
+ elif do_ebuild:
+ ebuild_pkg = arg
+ do_ebuild = False
+
+ else:
+ uimod = arg
if uimod in FRONTENDS:
try:
- exec ("from portato.gui.%s import run" % uimod)
+ exec ("from portato.gui.%s import run, show_ebuild" % uimod)
except ImportError, e:
print "'%s' should be installed, but cannot be imported. This is definitly a bug. (%s)" % (uimod, e[0])
sys.exit(1)
@@ -51,7 +59,10 @@ Written by René 'Necoro' Neumann <necoro@necoro.net>""" % VERSION
print
sys.exit(1)
- run()
+ if ebuild_pkg:
+ show_ebuild(ebuild_pkg)
+ else:
+ run()
if __name__ == "__main__":
main()