diff options
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/build_deps.sh | 32 | ||||
-rwxr-xr-x | scripts/cleanProject.sh | 8 |
2 files changed, 36 insertions, 4 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 diff --git a/scripts/cleanProject.sh b/scripts/cleanProject.sh index 058ef20e..c1d5df7a 100755 --- a/scripts/cleanProject.sh +++ b/scripts/cleanProject.sh @@ -9,7 +9,13 @@ git checkout -- \.\* rm -r $BASE_DIR/ics-openvpn rm -r $BASE_DIR/build rm -r $BASE_DIR/app/build -rm -r $BASE_DIR/go/lib/* +rm -r $BASE_DIR/bitmaskcore/lib/* rm -r $BASE_DIR/currentReleases +rm -r $BASE_DIR/tor-android/build +rm -r $BASE_DIR/tor-android/tor-android-binary/build +rm -r $BASE_DIR/tor-android/external/bin +rm -r $BASE_DIR/tor-android/external/include/ +rm -r $BASE_DIR/tor-android/external/*.build-stamp +rm -r $BASE_DIR/tor-android/external/lib git submodule sync --recursive git submodule update --init --recursive |