DPDK patches and discussions
 help / color / mirror / Atom feed
From: John McNamara <john.mcnamara@intel.com>
To: dev@dpdk.org
Subject: [dpdk-dev] [PATCH] tools: exit setup script without prompt
Date: Thu, 22 Oct 2015 11:36:27 +0100	[thread overview]
Message-ID: <1445510187-2954-1-git-send-email-john.mcnamara@intel.com> (raw)

Exit tools/setup.sh script without prompting "Press enter to continue".

The script can now be exited by typing the option number, "quit" or "q".

Signed-off-by: John McNamara <john.mcnamara@intel.com>
---
 tools/setup.sh | 14 ++++++++++++--
 1 file changed, 12 insertions(+), 2 deletions(-)

diff --git a/tools/setup.sh b/tools/setup.sh
index 5a8b2f3..fbd3853 100755
--- a/tools/setup.sh
+++ b/tools/setup.sh
@@ -57,6 +57,12 @@ quit()
 	QUIT=$1
 }
 
+# Shortcut for quit.
+q()
+{
+	quit
+}
+
 #
 # Sets up environmental variables for ICC.
 #
@@ -628,6 +634,10 @@ while [ "$QUIT" == "0" ]; do
 	read our_entry
 	echo ""
 	${OPTIONS[our_entry]} ${our_entry}
-	echo
-	echo -n "Press enter to continue ..."; read
+
+	if [ "$QUIT" == "0" ] ; then
+		echo
+		echo -n "Press enter to continue ..."; read
+	fi
+
 done
-- 
1.8.1.4

             reply	other threads:[~2015-10-22 10:36 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-10-22 10:36 John McNamara [this message]
2015-10-23 16:07 ` Van Haaren, Harry
2015-12-03 19:31   ` Thomas Monjalon

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=1445510187-2954-1-git-send-email-john.mcnamara@intel.com \
    --to=john.mcnamara@intel.com \
    --cc=dev@dpdk.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).