diff options
author | cyBerta <cyberta@riseup.net> | 2021-07-15 11:51:31 +0200 |
---|---|---|
committer | cyBerta <cyberta@riseup.net> | 2021-07-21 22:02:28 +0200 |
commit | 11e501a300e40bc254780723e39869c7830944eb (patch) | |
tree | 87d077d19ea25aa6dbc1b08384d97567ab19470a /scripts | |
parent | a747c9a01d6942a2c3a797c5d90ad1ccbbfcc83c (diff) |
check ndk version earlier, do first the tor binary build job
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/build_deps.sh | 45 |
1 files changed, 21 insertions, 24 deletions
diff --git a/scripts/build_deps.sh b/scripts/build_deps.sh index 7c0bfa74..e865bd49 100755 --- a/scripts/build_deps.sh +++ b/scripts/build_deps.sh @@ -19,6 +19,27 @@ EXPECTED_NDK_VERSION="21.4.7075529" # look for empty dir cd $BASE_DIR + +if [[ $(ls -A ${DIR_TORLIBS}) ]] +then + echo "Dirty build: Reusing tor libraries" +else + echo "Clean build: compiling tor libraries" + if [[ ! -d $DIR_TORLIBS ]] + then + mkdir $DIR_TORLIBS + fi + cd ./tor-android + if [[ $NDK_VERSION == $EXPECTED_NDK_VERSION ]] + then + ./tor-droid-make.sh fetch -c || quit "failed to checkout tor dependencies" + ./tor-droid-make.sh build -b release || quit "failed to build tor release binaries" + else + quit "expected NDK VERSION: $EXPECTED_NDK_VERSION. But found: $NDK_VERSION" + fi + cd .. +fi + if [[ $(ls -A ${DIR_OVPNASSETS}) && $(ls -A ${DIR_OVPNLIBS}) ]] then echo "Dirty build: skipped externalNativeBuild - reusing existing libs" @@ -52,29 +73,5 @@ else cp lib/bitmaskcore_x86-sources.jar ../lib-bitmask-core-x86/. cp lib/bitmaskcore_x86_64.aar ../lib-bitmask-core-x86_64/. cp lib/bitmaskcore_x86_64-sources.jar ../lib-bitmask-core-x86_64/. - cd .. -fi - -if [[ $(ls -A ${DIR_TORLIBS}) ]] -then - echo "Dirty build: Reusing tor libraries" -else - echo "Clean build: compiling tor libraries" - if [[ ! -d $DIR_TORLIBS ]] - then - mkdir $DIR_TORLIBS - fi - - cd ./tor-android - - if [[ $NDK_VERSION == $EXPECTED_NDK_VERSION ]] - then - ./tor-droid-make.sh fetch -c || quit "failed to checkout tor dependencies" - ./tor-droid-make.sh build -b release || quit "failed to build tor release binaries" - else - quit "expected NDK VERSION: $EXPECTED_NDK_VERSION. But found: $NDK_VERSION" - fi - - cd .. fi
\ No newline at end of file |