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_sodium.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_sodium.sh')
| -rwxr-xr-x | external/ios/build_sodium.sh | 22 |
1 files changed, 19 insertions, 3 deletions
diff --git a/external/ios/build_sodium.sh b/external/ios/build_sodium.sh index 0d4b955..8d5c786 100755 --- a/external/ios/build_sodium.sh +++ b/external/ios/build_sodium.sh @@ -10,9 +10,25 @@ SODIUM_URL="https://github.com/jedisct1/libsodium.git" echo "============================ SODIUM ============================" echo "Cloning SODIUM from - $SODIUM_URL" -git clone $SODIUM_URL $SODIUM_PATH -cd $SODIUM_PATH -git checkout 443617d7507498f7477703f0b51cb596d4539262 + +# Check if the directory already exists. +if [ -d "$SODIUM_PATH" ]; then + echo "Sodium directory already exists." +else + echo "Cloning Sodium from $SODIUM_URL" + git clone $SODIUM_URL $SODIUM_PATH +fi + +# Verify if the repository was cloned successfully. +if [ -d "$SODIUM_PATH/.git" ]; then + echo "Sodium repository cloned successfully." + cd $SODIUM_PATH + git checkout 443617d7507498f7477703f0b51cb596d4539262 +else + echo "Failed to clone Sodium repository. Exiting." + exit 1 +fi + ./dist-build/apple-xcframework.sh mv ${SODIUM_PATH}/libsodium-apple/ios/include/* $EXTERNAL_IOS_INCLUDE_DIR |
