diff options
| author | cyan <cyjan@mrcyjanek.net> | 2024-04-12 19:03:24 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-04-12 19:03:24 +0200 |
| commit | 52db5c78f8d94b7d30c27e08a94545fb8934661f (patch) | |
| tree | 01eef3d727ce4f16700c1027ec27cf58f3cf3eeb /external/ios/build_boost.sh | |
| parent | f5a6dbdd8ef45493a24c1a6130ad4168ca1dddaf (diff) | |
| parent | ae57e3dc6f45f4ec9f3bd07a15e45e9e5a10ae48 (diff) | |
Merge pull request #1 from cypherstack/scripts
Windows fix: do not fail on `git clone` if repo already exists
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}" \ |
