提交 bfc70ca1 编写于 作者: B Bill Hamilton

Fedora: added error checking to all curl HTTP requests and all git network...

Fedora: added error checking to all curl HTTP requests and all git network requests. Added version checking for boost libraries.
上级 2ec414e0
......@@ -109,19 +109,41 @@
fi
printf "\n\tChecking boost library installation.\n"
if [ ! -d ${HOME}/opt/boost_1_66_0 ]; then
# install boost
BVERSION=`cat "${BOOST_ROOT}/include/boost/version.hpp" 2>/dev/null | grep BOOST_LIB_VERSION | tail -1 | tr -s ' ' | cut -d\ -f3 | sed 's/[^0-9\._]//gI'`
if [ $BVERSION != "1_66" ]; then
printf "\tRemoving existing boost libraries in ../opt/boost* .\n"
rm -rf ${HOME}/opt/boost*
if [ $? -ne 0 ]; then
printf "\n\tUnable to remove deprecated boost libraries at this time.\n"
printf "\n\tExiting now.\n"
exit 1
fi
printf "\tInstalling boost libraries\n"
cd ${TEMP_DIR}
curl -L https://dl.bintray.com/boostorg/release/1.66.0/source/boost_1_66_0.tar.bz2 > boost_1.66.0.tar.bz2
tar xf boost_1.66.0.tar.bz2
cd boost_1_66_0/
STATUS=$(curl -LO -w '%{http_code}' --connect-timeout 30 https://dl.bintray.com/boostorg/release/1.66.0/source/boost_1_66_0.tar.bz2)
if [ $STATUS -ne 200 ]; then
printf "\tUnable to download Boost libraries at this time.\n"
printf "\tExiting now.\n\n"
exit;
fi
tar xf ${TEMP_DIR}/boost_1_66_0.tar.bz2
rm -f ${TEMP_DIR}/boost_1_66_0.tar.bz2
cd ${TEMP_DIR}/boost_1_66_0/
./bootstrap.sh "--prefix=$BOOST_ROOT"
if [ $? -ne 0 ]; then
printf "\n\tInstallation of boost libraries failed. 0\n"
printf "\n\tExiting now.\n"
exit 1
fi
./b2 -j${CPU_CORE} install
if [ $? -ne 0 ]; then
printf "\n\tInstallation of boost libraries failed. 1\n"
printf "\n\tExiting now.\n"
exit 1
fi
rm -rf ${TEMP_DIR}/boost_1_66_0/
rm -f ${TEMP_DIR}/boost_1.66.0.tar.bz2
else
printf "\tBoost 1.66 found at ${HOME}/opt/boost_1_66_0\n"
printf "\tBoost 1_66 found at ${HOME}/opt/boost_1_66_0\n"
fi
printf "\n\tChecking MongoDB C++ driver installation.\n"
......@@ -129,7 +151,8 @@
printf "\n\tInstalling MongoDB C & C++ drivers.\n"
cd ${TEMP_DIR}
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 2>/dev/null
printf "\tUnable to download MongoDB C driver at this time.\n"
printf "\tExiting now.\n\n"
......@@ -196,6 +219,11 @@
printf "\tInstalling secp256k1-zkp (Cryptonomex branch)\n"
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
......@@ -223,8 +251,18 @@
mkdir llvm-compiler 2>/dev/null
cd llvm-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
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册