From mboxrd@z Thu Jan 1 00:00:00 1970 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) Received: from orsmga001.jf.intel.com ([10.7.209.18]) by fmsmga103.fm.intel.com with ESMTP; 22 Oct 2015 03:36:31 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.20,181,1444719600"; d="scan'208";a="800077263" Received: from irvmail001.ir.intel.com ([163.33.26.43]) by orsmga001.jf.intel.com with ESMTP; 22 Oct 2015 03:36:30 -0700 Received: from sivswdev02.ir.intel.com (sivswdev02.ir.intel.com [10.237.217.46]) by irvmail001.ir.intel.com (8.14.3/8.13.6/MailSET/Hub) with ESMTP id t9MAaSxU016471; Thu, 22 Oct 2015 11:36:28 +0100 Received: from sivswdev02.ir.intel.com (localhost [127.0.0.1]) by sivswdev02.ir.intel.com with ESMTP id t9MAaSjo002993; Thu, 22 Oct 2015 11:36:28 +0100 Received: (from jmcnam2@localhost) by sivswdev02.ir.intel.com with id t9MAaSjP002989; Thu, 22 Oct 2015 11:36:28 +0100 From: John McNamara To: dev@dpdk.org Date: Thu, 22 Oct 2015 11:36:27 +0100 Message-Id: <1445510187-2954-1-git-send-email-john.mcnamara@intel.com> X-Mailer: git-send-email 1.7.4.1 Subject: [dpdk-dev] [PATCH] tools: exit setup script without prompt X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Oct 2015 10:36:36 -0000 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