summaryrefslogtreecommitdiff
path: root/build_deps.sh
diff options
context:
space:
mode:
authorcyBerta <cyberta@riseup.net>2019-10-01 00:25:54 +0200
committercyBerta <cyberta@riseup.net>2019-10-01 00:25:54 +0200
commitfca6c9dcff1b5b5400a61b7411a7f72460fbfbfa (patch)
treec8efd8b964d495467619000fa7435c2a5527efa1 /build_deps.sh
parent7820e8c0819a10c5b4729678607681fcfe30cbae (diff)
parent685da193ea29f3e7a8a42d55747dfb2f956f23b6 (diff)
Merge branch 'pluggableTransports2'
Diffstat (limited to 'build_deps.sh')
-rwxr-xr-xbuild_deps.sh29
1 files changed, 22 insertions, 7 deletions
diff --git a/build_deps.sh b/build_deps.sh
index 023baed5..7f0c8e89 100755
--- a/build_deps.sh
+++ b/build_deps.sh
@@ -1,22 +1,37 @@
#!/bin/bash
function quit {
- echo "Task failed. Exit value: $?."
+ echo "Task failed. $1."
exit 1
}
DIR_OVPNASSETS=./ics-openvpn/main/build/ovpnassets
DIR_OVPNLIBS=./ics-openvpn/main/build/intermediates/cmake/noovpn3/release/obj
+DIR_GOLIBS=./go/lib/
+FILE_X86=./go/out/x86/piedispatcherlib
+FILE_ARM=./go/out/armeabi-v7a/piedispatcherlib
+
# init
-# look for empty dir
+# look for empty dir
if [[ $(ls -A ${DIR_OVPNASSETS}) && $(ls -A ${DIR_OVPNLIBS}) ]]
then
echo "Dirty build: skipped externalNativeBuild - reusing existing libs"
else
- echo "Clean build: starting externalNativeBuild"
- cd ./ics-openvpn || quit
- ./gradlew clean main:externalNativeBuildCleanNoovpn3Release main:externalNativeBuildNoovpn3Release --debug --stacktrace || quit
- cd ..
-fi \ No newline at end of file
+ echo "Clean build: starting externalNativeBuild and GO dependency builds"
+ cd ./ics-openvpn || quit "Directory ics-opevpn not found"
+ ./gradlew clean main:externalNativeBuildCleanNoovpn3Release main:externalNativeBuildNoovpn3Release --debug --stacktrace || quit "Build ics-openvpn native libraries failed"
+ cd ..
+fi
+
+if [[ $(ls -A ${DIR_GOLIBS}) ]]
+then
+ echo "Dirty build: Reusing go libraries"
+else
+ echo "Clean build: compiling Go libraries"
+ cd ./go || quit "Directory go not found"
+ ./install_go.sh || quit "install_go.sh failed"
+ ./android_build_shapeshifter_lib.sh || quit "android_build_shapeshifter_dispatcher.sh failed"
+ cd ..
+fi