From mboxrd@z Thu Jan 1 00:00:00 1970 From: John McNamara Subject: [PATCH] tools: exit setup script without prompt Date: Thu, 22 Oct 2015 11:36:27 +0100 Message-ID: <1445510187-2954-1-git-send-email-john.mcnamara@intel.com> To: dev@dpdk.org Return-path: Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by dpdk.org (Postfix) with ESMTP id 350D59597 for ; Thu, 22 Oct 2015 12:36:35 +0200 (CEST) List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 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 --- 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