From: John McNamara Date: Thu, 22 Oct 2015 10:36:27 +0000 (+0100) Subject: tools: exit setup script without prompt X-Git-Tag: spdx-start~7911 X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=992ecdd839abaadda629295ed565e08618cc060c;p=dpdk.git tools: exit setup script without prompt 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 --- diff --git a/tools/setup.sh b/tools/setup.sh index 5a8b2f3cf5..fbd385384c 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