summaryrefslogtreecommitdiff
path: root/build_deps.sh
diff options
context:
space:
mode:
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