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_sodium.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_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 |
