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

after installing mongo c++ drivers changed code to cd into home dirctory...

after installing mongo c++ drivers changed code to cd into home dirctory before removing /tmp/mongodb-cxx-driver directory
上级 7829adab
...@@ -86,8 +86,8 @@ ...@@ -86,8 +86,8 @@
CXX_COMPILER=g++ CXX_COMPILER=g++
C_COMPILER=gcc C_COMPILER=gcc
export LLVM_DIR=${HOME}/opt/wasm/lib/cmake/llvm export LLVM_DIR=${HOME}/opt/wasm/lib/cmake/llvm
BUILD_MONGO_DB_PLUGIN=false BUILD_MONGO_DB_PLUGIN=true
MONGOD_CONF="" MONGOD_CONF=/etc/mongod.conf
;; ;;
"Linux Mint") "Linux Mint")
FILE=${WORK_DIR}/scripts/eosio_build_ubuntu.sh FILE=${WORK_DIR}/scripts/eosio_build_ubuntu.sh
......
...@@ -229,7 +229,7 @@ ...@@ -229,7 +229,7 @@
printf "\tExiting now.\n\n" printf "\tExiting now.\n\n"
exit; exit;
fi fi
cd .. cd
rm -rf ${TEMP_DIR}/mongo-cxx-driver rm -rf ${TEMP_DIR}/mongo-cxx-driver
else else
printf "\tMongo C++ driver found at /usr/local/lib/libmongocxx.dylib.\n" printf "\tMongo C++ driver found at /usr/local/lib/libmongocxx.dylib.\n"
......
...@@ -56,7 +56,7 @@ ...@@ -56,7 +56,7 @@
fi fi
printf "\t${UPDATE}\n" printf "\t${UPDATE}\n"
DEP_ARRAY=( git gcc.x86_64 gcc-c++.x86_64 autoconf automake libtool make cmake.x86_64 bzip2 bzip2-devel.x86_64 openssl-devel.x86_64 gmp.x86_64 gmp-devel.x86_64 libstdc++-devel.x86_64 python3-devel.x86_64 libedit.x86_64 ncurses-devel.x86_64 swig.x86_64 ) DEP_ARRAY=( git gcc.x86_64 gcc-c++.x86_64 autoconf automake libtool make cmake.x86_64 bzip2-devel.x86_64 openssl-devel.x86_64 gmp-devel.x86_64 libstdc++-devel.x86_64 python3-devel.x86_64 mongodb.x86_64 mongodb-server.x86_64 libedit.x86_64 ncurses-devel.x86_64 swig.x86_64 )
DCOUNT=0 DCOUNT=0
COUNT=1 COUNT=1
DISPLAY="" DISPLAY=""
...@@ -121,6 +121,73 @@ ...@@ -121,6 +121,73 @@
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 fi
printf "\n\tChecking for MongoDB C++ driver.\n"
# install libmongocxx.dylib
if [ ! -e /usr/local/lib/libmongocxx.so ]; then
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
rm -f ${TEMP_DIR}/mongo-c-driver-1.9.3.tar.gz 2>/dev/null
printf "\tUnable to download MondgDB C driver at this time.\n"
printf "\tExiting now.\n\n"
exit;
fi
tar xf mongo-c-driver-1.9.3.tar.gz
rm -f ${TEMP_DIR}/mongo-c-driver-1.9.3.tar.gz
cd mongo-c-driver-1.9.3
./configure --enable-ssl=openssl --disable-automatic-init-and-cleanup --prefix=/usr/local
if [ $? -ne 0 ]; then
printf "\tConfiguring MondgDB C driver has encountered the errors above.\n"
printf "\tExiting now.\n\n"
exit;
fi
make -j${CPU_CORE}
if [ $? -ne 0 ]; then
printf "\tError compiling MondgDB C driver.\n"
printf "\tExiting now.\n\n"
exit;
fi
sudo make install
if [ $? -ne 0 ]; then
printf "\tError installing MondgDB C driver.\nMake sure you have sudo privileges.\n"
printf "\tExiting now.\n\n"
exit;
fi
cd ..
rm -rf ${TEMP_DIR}/mongo-c-driver-1.9.3
cd ${TEMP_DIR}
git clone https://github.com/mongodb/mongo-cxx-driver.git --branch releases/stable --depth 1
if [ $? -ne 0 ]; then
printf "\tUnable to clone MondgDB C++ driver at this time.\n"
printf "\tExiting now.\n\n"
exit;
fi
cd mongo-cxx-driver/build
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr/local ..
if [ $? -ne 0 ]; then
printf "\tCmake has encountered the above errors building the MongoDB C++ driver.\n"
printf "\tExiting now.\n\n"
exit;
fi
sudo make -j${CPU_CORE}
if [ $? -ne 0 ]; then
printf "\tError compiling MondgDB C++ driver.\n"
printf "\tExiting now.\n\n"
exit;
fi
sudo make install
if [ $? -ne 0 ]; then
printf "\tError installing MondgDB C++ driver.\nMake sure you have sudo privileges.\n"
printf "\tExiting now.\n\n"
exit;
fi
cd
sudo rm -rf ${TEMP_DIR}/mongo-cxx-driver
else
printf "\tMongo C++ driver found at /usr/local/lib/libmongocxx.so.\n"
fi
printf "\n\tChecking for secp256k1-zkp\n" printf "\n\tChecking for secp256k1-zkp\n"
# install secp256k1-zkp (Cryptonomex branch) # install secp256k1-zkp (Cryptonomex branch)
if [ ! -e /usr/local/lib/libsecp256k1.a ]; then if [ ! -e /usr/local/lib/libsecp256k1.a ]; then
...@@ -176,4 +243,4 @@ ...@@ -176,4 +243,4 @@
rm -rf ${TEMP_DIR}/llvm-compiler 2>/dev/null rm -rf ${TEMP_DIR}/llvm-compiler 2>/dev/null
else else
printf "\tWASM found at ${HOME}/opt/wasm\n" printf "\tWASM found at ${HOME}/opt/wasm\n"
fi fi
\ No newline at end of file
...@@ -175,7 +175,7 @@ ...@@ -175,7 +175,7 @@
printf "\tExiting now.\n\n" printf "\tExiting now.\n\n"
exit; exit;
fi fi
cd .. cd
sudo rm -rf ${TEMP_DIR}/mongo-cxx-driver sudo rm -rf ${TEMP_DIR}/mongo-cxx-driver
else else
printf "\tMongo C++ driver found at /usr/local/lib/libmongocxx.so.\n" printf "\tMongo C++ driver found at /usr/local/lib/libmongocxx.so.\n"
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册