diff options
| author | cyan <cyjan@mrcyjanek.net> | 2024-08-14 09:58:27 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-08-14 09:58:27 +0200 |
| commit | 6948e084134fffcdce688f598598b1ee6f736715 (patch) | |
| tree | aacbf723ce342e9697eb5bd28a4177aec1f15699 /external/macos/build_unbound.sh | |
| parent | 2ccb12e2ed51617a91f5f5f2e30b5d8ba9bf52d0 (diff) | |
| parent | 5de323b1ba7387cf73973042f06383d4dbe619f5 (diff) | |
Merge branch 'master' into cyjan-fix_cakewallet_buildcyjan-fix_cakewallet_build
Diffstat (limited to 'external/macos/build_unbound.sh')
| -rwxr-xr-x | external/macos/build_unbound.sh | 22 |
1 files changed, 17 insertions, 5 deletions
diff --git a/external/macos/build_unbound.sh b/external/macos/build_unbound.sh index e9e1ff8..d1c3825 100755 --- a/external/macos/build_unbound.sh +++ b/external/macos/build_unbound.sh @@ -9,9 +9,15 @@ EXPAT_VERSION=R_2_4_8 EXPAT_HASH="3bab6c09bbe8bf42d84b81563ddbcf4cca4be838" EXPAT_SRC_DIR=${EXTERNAL_MACOS_SOURCE_DIR}/libexpat rm -rf $EXPAT_SRC_DIR -git clone https://github.com/libexpat/libexpat.git -b ${EXPAT_VERSION} ${EXPAT_SRC_DIR} +if [ -d "$EXPAT_SRC_DIR" ]; then + echo "Unbound directory already exists." +else + echo "Cloning Unbound from $Unbound_URL" + mkdir -p ${EXPAT_SRC_DIR} || true + rm -rf ${EXPAT_SRC_DIR} + cp -r "${MONEROC_DIR}/external/libexpat" ${EXPAT_SRC_DIR} +fi cd $EXPAT_SRC_DIR -test `git rev-parse HEAD` = ${EXPAT_HASH} || exit 1 cd $EXPAT_SRC_DIR/expat ./buildconf.sh @@ -28,10 +34,16 @@ UNBOUND_DIR_PATH="${EXTERNAL_MACOS_SOURCE_DIR}/unbound-1.16.2" echo "============================ Unbound ============================" rm -rf ${UNBOUND_DIR_PATH} -git clone https://github.com/NLnetLabs/unbound.git -b ${UNBOUND_VERSION} ${UNBOUND_DIR_PATH} +# Check if the directory already exists. +if [ -d "$UNBOUND_DIR_PATH" ]; then + echo "Unbound directory already exists." +else + echo "Cloning Unbound from $Unbound_URL" + mkdir -p ${UNBOUND_DIR_PATH} || true + rm -rf ${UNBOUND_DIR_PATH} + cp -r "${MONEROC_DIR}/external/unbound" ${UNBOUND_DIR_PATH} +fi cd $UNBOUND_DIR_PATH -test `git rev-parse HEAD` = ${UNBOUND_HASH} || exit 1 - ./configure --prefix="${EXTERNAL_MACOS_DIR}" \ --with-ssl="${HOMEBREW_PREFIX}" \ --with-libexpat="${EXTERNAL_MACOS_DIR}" \ |
