diff options
author | cyBerta <cyberta@riseup.net> | 2021-07-15 12:11:05 +0200 |
---|---|---|
committer | cyBerta <cyberta@riseup.net> | 2021-07-21 22:02:28 +0200 |
commit | 7b7fa94ff24aa56faf5123e867c2206c2ca69852 (patch) | |
tree | d8befe26ec18f7a208c83799ca4beab0f69dcd44 /scripts | |
parent | 11e501a300e40bc254780723e39869c7830944eb (diff) |
try to set ANDROID_NDK_HOME to expected NDK version
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/build_deps.sh | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/scripts/build_deps.sh b/scripts/build_deps.sh index e865bd49..58ed65c5 100755 --- a/scripts/build_deps.sh +++ b/scripts/build_deps.sh @@ -13,13 +13,21 @@ DIR_GOLIBS=./bitmaskcore/lib/ #FILE_X86=./go/out/x86/piedispatcherlib #FILE_ARM=./go/out/armeabi-v7a/piedispatcherlib DIR_TORLIBS=./tor-android/external/lib -NDK_VERSION=`cat $ANDROID_NDK_HOME/source.properties | grep Pkg.Revision | cut -d "=" -f2 | sed 's/ //g'` EXPECTED_NDK_VERSION="21.4.7075529" # init # look for empty dir cd $BASE_DIR +# try to set the expected ndk version +if [[ $(ls -A ${ANDROID_HOME}/ndk/${EXPECTED_NDK_VERSION}) ]] +then + ANDROID_NDK_HOME=${ANDROID_HOME}/ndk/${EXPECTED_NDK_VERSION} +fi +NDK_VERSION=`cat $ANDROID_NDK_HOME/source.properties | grep Pkg.Revision | cut -d "=" -f2 | sed 's/ //g'` + + +# build tor libs if [[ $(ls -A ${DIR_TORLIBS}) ]] then echo "Dirty build: Reusing tor libraries" @@ -40,6 +48,7 @@ else cd .. fi +# build openvpn libs if [[ $(ls -A ${DIR_OVPNASSETS}) && $(ls -A ${DIR_OVPNLIBS}) ]] then echo "Dirty build: skipped externalNativeBuild - reusing existing libs" @@ -50,6 +59,7 @@ else cd .. fi +# build bitmask core (shapeshifter, snowflake, pgpverify) if [[ $(ls -A ${DIR_GOLIBS}) ]] then echo "Dirty build: Reusing go libraries" |