Index: cross-bootstrap.sh |
=================================================================== |
new file mode 100755 |
--- /dev/null |
+++ b/cross-bootstrap.sh |
@@ -0,0 +1,44 @@ |
+#!/bin/sh |
+ |
+ |
+dir=`dirname $0` |
+if [ -z "$dir" ]; then |
+ dir = "." |
+fi |
+pushd $dir |
+ |
+if [ -z "$ANDROID_NDK_ROOT" ]; then |
+ |
+ case `uname` in |
+ Darwin) |
+ URL=https://dl.google.com/android/repository/android-ndk-r12b-darwin-x86_64.zip |
+ ;; |
+ Linux) |
+ URL=https://dl.google.com/android/repository/android-ndk-r12b-linux-x86_64.zip |
+ ;; |
+ *) |
+ exit 1 |
+ ;; |
+ esac |
+ if [ ! -f "third_party/android-ndk.zip" ]; then |
+ echo "Downloading NDK..." |
+ wget $URL -O third_party/android-ndk.zip |
+ fi |
+ if [ ! -d "third_party/android-ndk-r12b" ]; then |
+ echo "Unzipping NDK" |
+ unzip -q third_party/android-ndk.zip |
+ fi |
+ ANDROID_NDK_ROOT=`pwd`/third_party/android-ndk-r12b |
+fi |
+ |
+for file in cross/*.in ; do |
+ outfile=`dirname $file`/`basename $file .in` |
+ sed s#@ANDROID_NDK_ROOT@#$ANDROID_NDK_ROOT#g < $file > $outfile |
+done |
+ |
+popd |
+ |
+echo |
+echo "Please do this before proceeding:" |
+echo "export ANDROID_NDK_ROOT=$ANDROID_NDK_ROOT" |
+ |