summaryrefslogtreecommitdiff
path: root/external/ios/build_openssl.sh
diff options
context:
space:
mode:
authorcyan <cyjan@mrcyjanek.net>2024-04-12 19:03:24 +0200
committerGitHub <noreply@github.com>2024-04-12 19:03:24 +0200
commit52db5c78f8d94b7d30c27e08a94545fb8934661f (patch)
tree01eef3d727ce4f16700c1027ec27cf58f3cf3eeb /external/ios/build_openssl.sh
parentf5a6dbdd8ef45493a24c1a6130ad4168ca1dddaf (diff)
parentae57e3dc6f45f4ec9f3bd07a15e45e9e5a10ae48 (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_openssl.sh')
-rwxr-xr-xexternal/ios/build_openssl.sh19
1 files changed, 18 insertions, 1 deletions
diff --git a/external/ios/build_openssl.sh b/external/ios/build_openssl.sh
index 1a2439b..ad06311 100755
--- a/external/ios/build_openssl.sh
+++ b/external/ios/build_openssl.sh
@@ -11,7 +11,24 @@ echo "============================ OpenSSL ============================"
echo "Cloning Open SSL from - $OPEN_SSL_URL"
git clone $OPEN_SSL_URL $OPEN_SSL_DIR_PATH
-cd $OPEN_SSL_DIR_PATH
+
+# Check if the directory already exists.
+if [ -d "$OPEN_SSL_DIR_PATH" ]; then
+ echo "OpenSSL directory already exists."
+else
+ echo "Cloning OpenSSL from $OPEN_SSL_URL"
+ git clone $OPEN_SSL_URL $OPEN_SSL_DIR_PATH
+fi
+
+# Verify if the repository was cloned successfully.
+if [ -d "$OPEN_SSL_DIR_PATH/.git" ]; then
+ echo "OpenSSL repository cloned successfully."
+ cd $OPEN_SSL_DIR_PATH
+else
+ echo "Failed to clone OpenSSL repository. Exiting."
+ exit 1
+fi
+
./build-libssl.sh --version=1.1.1q --targets="ios-cross-arm64" --deprecated
mv ${OPEN_SSL_DIR_PATH}/include/* $EXTERNAL_IOS_INCLUDE_DIR