diff options
author | cyBerta <cyberta@riseup.net> | 2021-07-15 00:36:00 +0200 |
---|---|---|
committer | cyBerta <cyberta@riseup.net> | 2021-07-21 22:02:28 +0200 |
commit | 0822d3e0f62d9dcc9c1ce15bea941860affbf94f (patch) | |
tree | 65ddab5726d6bd8537c5f2d2c0553596cd760e0d /scripts/build_deps.sh | |
parent | 818281a7fdf8b43437e14478a2276dc821b69284 (diff) |
build tor binaries from source
Diffstat (limited to 'scripts/build_deps.sh')
-rwxr-xr-x | scripts/build_deps.sh | 32 |
1 files changed, 29 insertions, 3 deletions
diff --git a/scripts/build_deps.sh b/scripts/build_deps.sh index 1d8d26d5..fde8f878 100755 --- a/scripts/build_deps.sh +++ b/scripts/build_deps.sh @@ -10,9 +10,11 @@ BASE_DIR="$SCRIPT_DIR/.." DIR_OVPNASSETS=./ics-openvpn/main/build/ovpnassets DIR_OVPNLIBS=./ics-openvpn/main/build/intermediates/cmake/noovpn3/release/obj DIR_GOLIBS=./bitmaskcore/lib/ -FILE_X86=./go/out/x86/piedispatcherlib -FILE_ARM=./go/out/armeabi-v7a/piedispatcherlib - +#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 @@ -51,4 +53,28 @@ else 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 + ./tor-droid-make.sh build -b release + else + echo "expected NDK VERSION: $EXPECTED_NDK_VERSION. But found: $NDK_VERSION" + fi + + cd .. +fi
\ No newline at end of file |