All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Meier, Dennis" <meier.dennis@siemens.com>
To: "yocto@yoctoproject.org" <yocto@yoctoproject.org>
Cc: "Bach, Pascal" <pascal.bach@siemens.com>,
	"Meier, Roger" <r.meier@siemens.com>
Subject: [PATCH] populate_sdk_base: add auto-completion in setup
Date: Thu, 12 Jun 2014 15:47:37 +0000	[thread overview]
Message-ID: <6F22A92316C68C42A591A48A6291DA9DD941E2@DEFTHW99EI0MSX.ww902.siemens.net> (raw)

[-- 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


             reply	other threads:[~2014-06-12 15:50 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-06-12 15:47 Meier, Dennis [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=6F22A92316C68C42A591A48A6291DA9DD941E2@DEFTHW99EI0MSX.ww902.siemens.net \
    --to=meier.dennis@siemens.com \
    --cc=pascal.bach@siemens.com \
    --cc=r.meier@siemens.com \
    --cc=yocto@yoctoproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.