All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] populate_sdk_base: add auto-completion in setup
@ 2014-06-17 13:16 Dennis Meier
  2014-06-17 14:03 ` Laurentiu Palcu
  2014-06-17 14:39 ` Otavio Salvador
  0 siblings, 2 replies; 10+ messages in thread
From: Dennis Meier @ 2014-06-17 13:16 UTC (permalink / raw)
  To: openembedded-core

Signed-off-by: Dennis Meier <meier.dennis@siemens.com>
---
 meta/classes/populate_sdk_base.bbclass |    3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/meta/classes/populate_sdk_base.bbclass b/meta/classes/populate_sdk_base.bbclass
index 35d837d..1182425 100644
--- a/meta/classes/populate_sdk_base.bbclass
+++ b/meta/classes/populate_sdk_base.bbclass
@@ -173,9 +173,8 @@ if [ $verbose = 1 ] ; then
 	set -x
 fi
 
-printf "Enter target directory for SDK (default: $DEFAULT_INSTALL_DIR): "
 if [ "$target_sdk_dir" = "" ]; then
-	read target_sdk_dir
+	read -e -p "Enter target directory for SDK (default: $DEFAULT_INSTALL_DIR): " target_sdk_dir
 	[ "$target_sdk_dir" = "" ] && target_sdk_dir=$DEFAULT_INSTALL_DIR
 else
 	echo "$target_sdk_dir"
-- 
1.7.10.4



^ permalink raw reply related	[flat|nested] 10+ messages in thread
* [PATCH] populate_sdk_base: add auto-completion in setup
@ 2014-06-12 15:47 Meier, Dennis
  0 siblings, 0 replies; 10+ messages in thread
From: Meier, Dennis @ 2014-06-12 15:47 UTC (permalink / raw)
  To: yocto@yoctoproject.org; +Cc: Bach, Pascal, Meier, Roger

[-- Attachment #1: Type: text/plain, Size: 520 bytes --]

Hello Yocto-Community,

It's really easy to add auto completion in the SDK setup scripts
with BASH's "read -e -p". I attached a short patch that does this.
Makes life very comfortable ;-).

I already asked Paul Eggleton on IRC about the change, and our only concern
is that it could break the script in other shells than BASH. However, since
the script already starts with #!/bin/bash hopefully isn't a real problem.

Any thoughts? I would love to see this in an upcoming release.

Regards,
Dennis





[-- Attachment #2: 0001-populate_sdk_base-add-auto-completion-in-setup.patch --]
[-- Type: application/octet-stream, Size: 1372 bytes --]

From 4eca8b152606594500a1dee4455e5f01aae49d95 Mon Sep 17 00:00:00 2001
From: Dennis Meier <meier.dennis@siemens.com>
Date: Thu, 12 Jun 2014 16:47:23 +0200
Subject: [PATCH] populate_sdk_base: add auto-completion in setup

It's really easy to add auto completion in the SDK setup scripts
with BASH's read -e -p. Makes life very comfortable ;-).

I already asked Paul Eggleton on IRC about the change, and our only concern
is that it could break the script in other shells than BASH. However, since
the script already starts with #!/bin/bash this shouldn't be a problem.
 
Any thoughts? I would love to see this in an upcoming release.

Regards,
Dennis

---
 meta/classes/populate_sdk_base.bbclass |    3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/meta/classes/populate_sdk_base.bbclass b/meta/classes/populate_sdk_base.bbclass
index 10d04ed..a8ef60b 100644
--- a/meta/classes/populate_sdk_base.bbclass
+++ b/meta/classes/populate_sdk_base.bbclass
@@ -173,9 +173,8 @@ if [ $verbose = 1 ] ; then
 	set -x
 fi
 
-printf "Enter target directory for SDK (default: $DEFAULT_INSTALL_DIR): "
 if [ "$target_sdk_dir" = "" ]; then
-	read target_sdk_dir
+	read -e -p "Enter target directory for SDK (default: $DEFAULT_INSTALL_DIR): " target_sdk_dir
 	[ "$target_sdk_dir" = "" ] && target_sdk_dir=$DEFAULT_INSTALL_DIR
 else
 	echo "$target_sdk_dir"
-- 
1.7.10.4


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

end of thread, other threads:[~2014-06-29  8:02 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-06-17 13:16 [PATCH] populate_sdk_base: add auto-completion in setup Dennis Meier
2014-06-17 14:03 ` Laurentiu Palcu
2014-06-29  8:01   ` Richard Purdie
2014-06-17 14:39 ` Otavio Salvador
2014-06-18 10:15   ` Richard Purdie
2014-06-18 11:29     ` Otavio Salvador
2014-06-24 10:01   ` Meier, Dennis
2014-06-25 16:26     ` Paul Eggleton
2014-06-25 16:58       ` Otavio Salvador
  -- strict thread matches above, loose matches on Subject: below --
2014-06-12 15:47 Meier, Dennis

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.