-
-
Notifications
You must be signed in to change notification settings - Fork 11.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
25 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,28 @@ | ||
#!/bin/bash | ||
|
||
ndk-build clean | ||
ndk-build | ||
function try () { | ||
"$@" || exit -1 | ||
} | ||
|
||
# Build | ||
try ndk-build clean | ||
try ndk-build | ||
|
||
# copy executables | ||
rm -rf src/main/assets/armeabi-v7a | ||
rm -rf src/main/assets/x86 | ||
mkdir -p src/main/assets/armeabi-v7a | ||
mkdir -p src/main/assets/x86 | ||
for app in pdnsd redsocks | ||
do | ||
mv libs/armeabi-v7a/$app src/main/assets/armeabi-v7a/ | ||
mv libs/x86/$app src/main/assets/x86/ | ||
try mv libs/armeabi-v7a/$app src/main/assets/armeabi-v7a/ | ||
try mv libs/x86/$app src/main/assets/x86/ | ||
done | ||
|
||
# copy libraries | ||
rm -rf src/main/jni/armeabi-v7a | ||
rm -rf src/main/jni/x86 | ||
mkdir -p src/main/jni/armeabi-v7a | ||
mkdir -p src/main/jni/x86 | ||
try mv libs/armeabi-v7a/*.so src/main/jni/armeabi-v7a/ | ||
try mv libs/x86/*.so src/main/jni/x86/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters