From: Erik van der Kouwe Date: Sat, 21 Jun 2014 14:08:42 +0000 (-0700) Subject: configure.llvm: add INTERACTIVE environment variable which can be set to no to preven... X-Git-Tag: v3.3.0~147 X-Git-Url: http://zhaoyanbai.com/repos/%22http:/www.isc.org/icons/zlib_tech.html?a=commitdiff_plain;h=193bd04207e947ef8737979fe445ab9d67114928;p=minix.git configure.llvm: add INTERACTIVE environment variable which can be set to no to prevent questions from being asked --- diff --git a/minix/llvm/configure.llvm b/minix/llvm/configure.llvm index 1b370257d..7d6866c74 100755 --- a/minix/llvm/configure.llvm +++ b/minix/llvm/configure.llvm @@ -51,7 +51,11 @@ if [ "${ROOT}" == "" ]; then echo "Please specify the path to the \"llvm-apps\" repository..." echo "Default value: ${DEFAULT_LLVM_ROOT} . " echo "If this is correct, press ENTER. Otherwise please enter the path." - read response + if [ "$INTERACTIVE" = "no" ]; then + response="" + else + read response + fi if [ "" == "${response}" ]; then ROOT=${DEFAULT_LLVM_ROOT} @@ -88,7 +92,11 @@ fi if [ "${GEN_GOLD_PLUGIN}" == "yes" ] && [ -f "${MYPWD}/.gold_generated" ]; then echo "It is found that Gold plugin has already been generated. Would you like to re-generate? [y | n]" - read response + if [ "$INTERACTIVE" == "no" ]; then + response=n + else + read response + fi if [ "y" == "$response" ] || [ "Y" == "$response" ]; then echo "Gold shall be regenerated." else