From 739718f95ce114b1ffceeb23804f119c9b3d3474 Mon Sep 17 00:00:00 2001 From: Jonghoon Jin Date: Sat, 6 May 2017 12:51:14 -0700 Subject: [PATCH] better handling of MKL check in configure not prompted to ask MKL download if the var is set already remove unexpected exit when input is given by user --- configure | 24 +++++++++++------------- 1 file changed, 11 insertions(+), 13 deletions(-) diff --git a/configure b/configure index 05be9dc29b2..308369efd32 100755 --- a/configure +++ b/configure @@ -195,15 +195,17 @@ done OSNAME=`uname -s` if [ "$TF_NEED_MKL" == "1" ]; then # TF_NEED_MKL - fromuser="" - read -p "Do you wish to download MKL LIB from the web? [Y/n] " INPUT - fromuser="1" - case $INPUT in - [Yy]* ) TF_DOWNLOAD_MKL=1;; - [Nn]* ) TF_DOWNLOAD_MKL=0;; - "" ) TF_DOWNLOAD_MKL=1;; - * ) echo "Invalid selection: " $INPUT; exit 1;; - esac + while [ "$TF_DOWNLOAD_MKL" == "" ]; do + fromuser="" + read -p "Do you wish to download MKL LIB from the web? [Y/n] " INPUT + fromuser="1" + case $INPUT in + [Yy]* ) TF_DOWNLOAD_MKL=1;; + [Nn]* ) TF_DOWNLOAD_MKL=0;; + "" ) TF_DOWNLOAD_MKL=1;; + * ) echo "Invalid selection: " $INPUT; exit 1;; + esac + done if [[ "$TF_DOWNLOAD_MKL" == "1" ]]; then DST=`dirname $0` @@ -263,10 +265,6 @@ if [ "$TF_NEED_MKL" == "1" ]; then # TF_NEED_MKL exit 1 fi - if [ -z "$fromuser" ]; then - exit 1 - fi - cat > third_party/mkl/mkl.config <