diff options
author | Richard Purdie <rpurdie@linux.intel.com> | 2007-08-25 15:14:07 +0000 |
---|---|---|
committer | Richard Purdie <rpurdie@linux.intel.com> | 2007-08-25 15:14:07 +0000 |
commit | e54a8bb9c40e2775b0fd24a2e39902e22b70cca1 (patch) | |
tree | 7a5ae4572dab4f4473e83976891cea5d8a974808 /bin | |
parent | b5b067c18dd66ed6d26394cd2637e131f912ed4c (diff) | |
download | bitbake-e54a8bb9c40e2775b0fd24a2e39902e22b70cca1.tar.gz |
bin/bitbake: Add UI selection option
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/bitbake | 20 |
1 files changed, 17 insertions, 3 deletions
diff --git a/bin/bitbake b/bin/bitbake index c3af2cbac..73a0640ee 100755 --- a/bin/bitbake +++ b/bin/bitbake @@ -108,12 +108,28 @@ Default BBFILES are the .bb files in the current directory.""" ) parser.add_option( "-P", "--profile", help = "profile the command and print a report", action = "store_true", dest = "profile", default = False ) + parser.add_option( "-u", "--ui", help = "userinterface to use", + action = "store", dest = "ui") + options, args = parser.parse_args(sys.argv) configuration = BBConfiguration(options) configuration.pkgs_to_build = [] configuration.pkgs_to_build.extend(args[1:]) + + # Work out which UI(s) to use + curseUI = False + if configuration.ui: + if configuration.ui == "ncurses": + curseUI = True + elif configuration.ui == "knotty" or configuration.ui == "tty" or configuration.ui == "file": + curseUI = False + else: + print "FATAL: Invalid user interface '%s' specified." % configuration.ui + sys.exit(1) + + cooker = bb.cooker.BBCooker(configuration) host = cooker.server.host port = cooker.server.port @@ -135,9 +151,7 @@ Default BBFILES are the .bb files in the current directory.""" ) # Launch the UI try: - curseUI = True - curseUI = False - + # Disable UIs that need a terminal if not os.isatty(sys.stdout.fileno()): curseUI = False |