From bf0b6555a86215ea2a97127a3e596bc33de58407 Mon Sep 17 00:00:00 2001 From: Miao Jiang Date: Mon, 24 Dec 2012 20:50:03 +0800 Subject: [PATCH] stop building when curl.h isn't found. --- src/generate_curl_options_list.sh | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/generate_curl_options_list.sh b/src/generate_curl_options_list.sh index a8c3c7d..616e4dd 100755 --- a/src/generate_curl_options_list.sh +++ b/src/generate_curl_options_list.sh @@ -3,10 +3,6 @@ root=`dirname $0` if [ "$NODE_CURL_H" != "" ] ; then - if [ ! -f "$NODE_CURL_H" ] ; then - echo "cannot find curl's header file $NODE_CURL_H ." - exit 1 - fi curl_header=$NODE_CURL_H elif [ -f "/usr/local/include/curl/curl.h" ] ; then curl_header="/usr/local/include/curl/curl.h" @@ -14,7 +10,12 @@ elif [ -f "/usr/include/curl/curl.h" ] ; then curl_header="/usr/include/curl/curl.h" fi -echo "extract constants from $curl_header" +if [ ! -f $curl_header ] ; then + echo "cannot find curl's header file $curl_header" + exit 1 +else + echo "extract constants from $curl_header" +fi generate() { name=$1