diff options
author | Parménides GV <parmegv@sdf.org> | 2013-07-09 20:39:52 +0200 |
---|---|---|
committer | cyBerta <richy@cyborgsociety.org> | 2013-11-13 00:04:11 +0100 |
commit | 686993c2730d24fa0e171ff80aa27c87e85cb3ec (patch) | |
tree | ad7720794f5bd9362518b93555ab975e171012f0 | |
parent | 002e1f633b7bda7b713f84be3bf0ad19f5a23c8c (diff) |
Looks for correct ndk-build command.
If the build-native.sh script points to a different ndk-build
executable, it uses it.
If not, compile.sh looks for a build-native.sh in the $PATH and, if
present, correct the possible erroneous path in build-native (just to
avoid silly edits in that file), and compiles with it.
-rw-r--r-- | compile-with-ndk.sh | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/compile-with-ndk.sh b/compile-with-ndk.sh new file mode 100644 index 00000000..f938afbf --- /dev/null +++ b/compile-with-ndk.sh @@ -0,0 +1,16 @@ +#!/bin/bash +function compile() { + svn co http://google-breakpad.googlecode.com/svn/trunk/ google-breakpad + ./build-native.sh + android update project --path . --name "LEAP Android" --target android-16 + ant debug +} + +if command -v $(head -n 1 build-native.sh | column | cut -d ' ' -f 1); then + compile +elif command -v ndk-build; then + sed -i 's/.*ndk-build/ndk-build/g' build-native.sh + compile +else + echo "Install ndk, or modify build-native script to point to your ndk-build executable" +fi |