diff options
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 |
