diff --git a/scripts/eosio_build_darwin.sh b/scripts/eosio_build_darwin.sh index e04491ad9583e891d3bf3b5c48f162a01b7584f8..9037c0595123f7c6d54c6de8cc677131dbf0be06 100644 --- a/scripts/eosio_build_darwin.sh +++ b/scripts/eosio_build_darwin.sh @@ -84,7 +84,6 @@ fi printf "\tHome Brew installation found.\n\n" - DCOUNT=0 COUNT=1 PERMISSION_GETTEXT=0 DISPLAY="" @@ -107,7 +106,6 @@ continue fi fi - let DCOUNT++ if [ $brewname = "gettext" ]; then PERMISSION_GETTEXT=1 fi @@ -128,7 +126,7 @@ printf "\t\t Python3 found\n" fi - if [ $DCOUNT -ne 0 ]; then + if [ $COUNT -gt 1 ]; then printf "\n\tThe following dependencies are required to install EOSIO.\n" printf "\n\t$DISPLAY\n\n" echo "Do you wish to install these packages?" @@ -153,14 +151,13 @@ printf "\n\tNo required Home Brew dependencies to install.\n" fi - printf "\n\tChecking for MongoDB C++ driver\n" - # install libmongocxx.dylib + printf "\n\tChecking MongoDB C++ driver installation.\n" if [ ! -e /usr/local/lib/libmongocxx-static.a ]; then cd ${TEMP_DIR} brew install --force pkgconfig brew unlink pkgconfig && brew link --force pkgconfig - curl -LO https://github.com/mongodb/mongo-c-driver/releases/download/1.9.3/mongo-c-driver-1.9.3.tar.gz - if [ $? -ne 0 ]; then + STATUS=$(curl -LO -w '%{http_code}' --connect-timeout 30 https://github.com/mongodb/mongo-c-driver/releases/download/1.9.3/mongo-c-driver-1.9.3.tar.gz) + if [ $STATUS -ne 200 ]; then rm -f ${TEMP_DIR}/mongo-c-driver-1.9.3.tar.gz printf "\tUnable to download MongoDB C driver at this time.\n" printf "\tExiting now.\n\n" @@ -222,11 +219,16 @@ printf "\tMongo C++ driver found at /usr/local/lib/libmongocxx-static.a.\n" fi - printf "\n\tChecking for secp256k1-zkp\n" + printf "\n\tChecking secp256k1-zkp installation.\n" # install secp256k1-zkp (Cryptonomex branch) if [ ! -e /usr/local/lib/libsecp256k1.a ]; then cd ${TEMP_DIR} git clone https://github.com/cryptonomex/secp256k1-zkp.git + if [ $? -ne 0 ]; then + printf "\tUnable to clone repo secp256k1-zkp @ https://github.com/cryptonomex/secp256k1-zkp.git.\n" + printf "\tExiting now.\n\n" + exit; + fi cd secp256k1-zkp ./autogen.sh if [ $? -ne 0 ]; then @@ -247,15 +249,24 @@ printf "\tsecp256k1 found at /usr/local/lib/\n" fi - printf "\n\tChecking for WASM\n" + printf "\n\tChecking LLVM with WASM support.\n" if [ ! -d /usr/local/wasm/bin ]; then - # Build LLVM and clang for WASM: cd ${TEMP_DIR} mkdir wasm-compiler cd wasm-compiler git clone --depth 1 --single-branch --branch release_40 https://github.com/llvm-mirror/llvm.git + if [ $? -ne 0 ]; then + printf "\tUnable to clone llvm repo @ https://github.com/llvm-mirror/llvm.git.\n" + printf "\tExiting now.\n\n" + exit; + fi cd llvm/tools git clone --depth 1 --single-branch --branch release_40 https://github.com/llvm-mirror/clang.git + if [ $? -ne 0 ]; then + printf "\tUnable to clone clang repo @ https://github.com/llvm-mirror/clang.git.\n" + printf "\tExiting now.\n\n" + exit; + fi cd .. mkdir build cd build