forked from krzyzanowskim/OpenSSL
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtc3-apple-build-wrapper.sh
More file actions
executable file
·49 lines (48 loc) · 1.18 KB
/
tc3-apple-build-wrapper.sh
File metadata and controls
executable file
·49 lines (48 loc) · 1.18 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
#!/bin/bash
# tc3-apple-build-wrapper.sh, ABr
#
# assume known latest version for compile
OPENSSL_VERSION="${OPENSSL_VERSION:-3.5.2}"
#
# Build openssl for apple with mods to compile correctly
the_log=/tmp/build_openssl_apple.log
echo 'build_openssl_apple: Start...'
echo ''
# no more auto-remove...
#echo 'remove temporary files...'
#echo "rm -fR ./iphoneos/* ./iphonesimulator/* ./macosx/* ./macosx_catalyst/*"
#rm -fR ./iphoneos/* ./iphonesimulator/* ./macosx/* ./macosx_catalyst/*
#echo ''
echo "scripts/build.sh"
scripts/build.sh
the_rc=$? ; [ $the_rc -ne 0 ] && exit $the_rc
echo ''
echo 'Updating include files...'
for i in iphoneos iphonesimulator macosx ; do
echo "cd $i/include"
cd $i/include
the_rc=$? ; [ $the_rc -ne 0 ] && continue
if [ -d ./OpenSSL ] ; then
echo "mv OpenSSL openssl"
mv OpenSSL openssl
fi
if [ ! -d ./openssl ] ; then
echo 'Missing openssl'
cd ../..
continue
fi
echo "cd openssl"
cd openssl 2>&1
the_rc=$?
if [ $the_rc -eq 0 ] ; then
echo "sed -ie 's/<OpenSSL/<openssl/' *.h"
sed -ie 's/<OpenSSL/<openssl/' *.h
echo 'cd ../../..'
cd ../../..
else
echo 'cd ../..'
cd ../..
fi
echo ''
done
echo 'Done.'