diff options
| author | sneurlax <sneurlax@gmail.com> | 2024-04-12 16:43:52 -0500 |
|---|---|---|
| committer | sneurlax <sneurlax@gmail.com> | 2024-04-12 16:43:52 -0500 |
| commit | ae57e3dc6f45f4ec9f3bd07a15e45e9e5a10ae48 (patch) | |
| tree | 01eef3d727ce4f16700c1027ec27cf58f3cf3eeb /external/ios/build_boost.sh | |
| parent | f5a6dbdd8ef45493a24c1a6130ad4168ca1dddaf (diff) | |
do not fail if repo already exists
build_single.sh will fail on Windows (WSL2) due to `git clone` if we already did a `git submodule update --init --recursive`
Diffstat (limited to 'external/ios/build_boost.sh')
| -rwxr-xr-x | external/ios/build_boost.sh | 21 |
1 files changed, 19 insertions, 2 deletions
diff --git a/external/ios/build_boost.sh b/external/ios/build_boost.sh index 1341c69..acef5c7 100755 --- a/external/ios/build_boost.sh +++ b/external/ios/build_boost.sh @@ -13,8 +13,25 @@ BOOST_LIBS="random regex graph random chrono thread filesystem system date_time echo "============================ Boost ============================" echo "Cloning Apple-Boost-BuildScript from - $BOOST_URL" -git clone -b build $BOOST_URL $BOOST_DIR_PATH -cd $BOOST_DIR_PATH + +# Check if the directory already exists. +if [ -d "$BOOST_DIR_PATH" ]; then + echo "Boost directory already exists." +else + echo "Cloning Boost from $BOOST_URL" + git clone -b build $BOOST_URL $BOOST_DIR_PATH +fi + +# Verify if the repository was cloned successfully. +if [ -d "$BOOST_DIR_PATH/.git" ]; then + echo "Boost repository cloned successfully." + cd $BOOST_DIR_PATH + git checkout build +else + echo "Failed to clone Boost repository. Exiting." + exit 1 +fi + ./boost.sh -ios \ --min-ios-version ${MIN_IOS_VERSION} \ --boost-libs "${BOOST_LIBS}" \ |
