Skip to content

Commit

Permalink
fix: mv will fail on consecutive runs
Browse files Browse the repository at this point in the history
  • Loading branch information
julian-CStack committed Nov 4, 2024
1 parent d680399 commit eeb4b2a
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 17 deletions.
12 changes: 6 additions & 6 deletions external/ios/build_boost.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,17 +16,17 @@ if [ -d "$BOOST_DIR_PATH" ]; then
echo "Boost directory already exists."
else
echo "Cloning Boost from $BOOST_URL"
mkdir -p $BOOST_DIR_PATH || true
rm -rf $BOOST_DIR_PATH || true
cp -r "${MONEROC_DIR}/external/Apple-Boost-BuildScript" $BOOST_DIR_PATH
mkdir -p "$BOOST_DIR_PATH" || true
rm -rf "$BOOST_DIR_PATH" || true
cp -r "${MONEROC_DIR}/external/Apple-Boost-BuildScript" "$BOOST_DIR_PATH"
fi
cd $BOOST_DIR_PATH
cd "$BOOST_DIR_PATH"

./boost.sh -ios \
--min-ios-version ${MIN_IOS_VERSION} \
--boost-libs "${BOOST_LIBS}" \
--boost-version ${BOOST_VERSION} \
--no-framework

mv -f ${BOOST_DIR_PATH}/build/boost/${BOOST_VERSION}/ios/release/prefix/include/* $EXTERNAL_IOS_INCLUDE_DIR
mv -f ${BOOST_DIR_PATH}/build/boost/${BOOST_VERSION}/ios/release/prefix/lib/* $EXTERNAL_IOS_LIB_DIR
cp -r "${BOOST_DIR_PATH}/build/boost/${BOOST_VERSION}/ios/release/prefix/include/*" "$EXTERNAL_IOS_INCLUDE_DIR"
cp -r "${BOOST_DIR_PATH}/build/boost/${BOOST_VERSION}/ios/release/prefix/lib/*" "$EXTERNAL_IOS_LIB_DIR"
10 changes: 5 additions & 5 deletions external/ios/build_openssl.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,13 @@ if [ -d "$OPEN_SSL_DIR_PATH" ]; then
else
mkdir -p "$OPEN_SSL_DIR_PATH" || true
rm -rf "$OPEN_SSL_DIR_PATH"
cp -r "${MONEROC_DIR}/external/OpenSSL-for-iPhone" $OPEN_SSL_DIR_PATH
cp -r "${MONEROC_DIR}/external/OpenSSL-for-iPhone" "$OPEN_SSL_DIR_PATH"
fi
cd $OPEN_SSL_DIR_PATH
cd "$OPEN_SSL_DIR_PATH"

./build-libssl.sh --version=1.1.1q --targets="ios-cross-arm64" --deprecated


mv -f ${OPEN_SSL_DIR_PATH}/include/* $EXTERNAL_IOS_INCLUDE_DIR
mv -f ${OPEN_SSL_DIR_PATH}/lib/libcrypto-iOS.a ${EXTERNAL_IOS_LIB_DIR}/libcrypto.a
mv -f ${OPEN_SSL_DIR_PATH}/lib/libssl-iOS.a ${EXTERNAL_IOS_LIB_DIR}/libssl.a
cp -r "${OPEN_SSL_DIR_PATH}"/include/* "$EXTERNAL_IOS_INCLUDE_DIR"
cp "${OPEN_SSL_DIR_PATH}"/lib/libcrypto-iOS.a "${EXTERNAL_IOS_LIB_DIR}"/libcrypto.a
cp "${OPEN_SSL_DIR_PATH}"/lib/libssl-iOS.a "${EXTERNAL_IOS_LIB_DIR}"/libssl.a
12 changes: 6 additions & 6 deletions external/ios/build_sodium.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,13 @@ if [ -d "$SODIUM_PATH" ]; then
echo "Sodium directory already exists."
else
echo "Cloning Sodium from $SODIUM_URL"
mkdir -p $SODIUM_PATH || true
rm -rf $SODIUM_PATH
cp -r "${MONEROC_DIR}/external/libsodium" $SODIUM_PATH
mkdir -p "$SODIUM_PATH" || true
rm -rf "$SODIUM_PATH"
cp -r "${MONEROC_DIR}/external/libsodium" "$SODIUM_PATH"
fi

cd $SODIUM_PATH
cd "$SODIUM_PATH"
../../../../libsodium_apple-ios.sh

mv -f ${SODIUM_PATH}/libsodium-apple/ios/include/* $EXTERNAL_IOS_INCLUDE_DIR
mv -f ${SODIUM_PATH}/libsodium-apple/ios/lib/* $EXTERNAL_IOS_LIB_DIR
cp -r "${SODIUM_PATH}"/libsodium-apple/ios/include/* "$EXTERNAL_IOS_INCLUDE_DIR"
cp -r "${SODIUM_PATH}"/libsodium-apple/ios/lib/* "$EXTERNAL_IOS_LIB_DIR"

0 comments on commit eeb4b2a

Please sign in to comment.