All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] cml1.bbclass: Only delay exit if the command fails
@ 2012-06-15 21:44 Darren Hart
  2012-06-18 15:20 ` Darren Hart
  2012-06-25 16:02 ` Saul Wold
  0 siblings, 2 replies; 3+ messages in thread
From: Darren Hart @ 2012-06-15 21:44 UTC (permalink / raw)
  To: openembedded-core; +Cc: Darren Hart

Rather than pause for 5 seconds, test the return code of the command and
require user input before exiting on failure. This avoids pausing after
successful command execution as well as possibly not waiting long enough
if the user happens to be doing something else for 5 seconds.

Signed-off-by: Darren Hart <dvhart@linux.intel.com>
---
 meta/classes/cml1.bbclass |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/meta/classes/cml1.bbclass b/meta/classes/cml1.bbclass
index bd25311..52d520a 100644
--- a/meta/classes/cml1.bbclass
+++ b/meta/classes/cml1.bbclass
@@ -15,7 +15,7 @@ HOSTLDFLAGS = "${BUILD_LDFLAGS}"
 HOST_LOADLIBES = "-lncurses"
 
 python do_menuconfig() {
-        oe_terminal("${SHELL} -c \"make menuconfig; echo 'Pausing for 5 seconds'; sleep 5\"", '${PN} Configuration', d)
+        oe_terminal("${SHELL} -c \"make menuconfig; if [ $? -ne 0 ]; then echo 'Command failed.'; echo -n 'Press any key to continue... '; read r; fi\"", '${PN} Configuration', d)
 }
 do_menuconfig[depends] += "ncurses-native:do_populate_sysroot"
 do_menuconfig[nostamp] = "1"
-- 
1.7.5.4




^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2012-06-25 16:13 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-06-15 21:44 [PATCH] cml1.bbclass: Only delay exit if the command fails Darren Hart
2012-06-18 15:20 ` Darren Hart
2012-06-25 16:02 ` Saul Wold

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.