OLD | NEW |
(Empty) | |
| 1 #!/bin/sh |
| 2 |
| 3 |
| 4 dir=`dirname $0` |
| 5 if [ -z "$dir" ]; then |
| 6 dir = "." |
| 7 fi |
| 8 pushd $dir |
| 9 |
| 10 if [ -z "$ANDROID_NDK_ROOT" ]; then |
| 11 |
| 12 case `uname` in |
| 13 Darwin) |
| 14 URL=https://dl.google.com/android/repository/android-ndk-r12b-darwin
-x86_64.zip |
| 15 ;; |
| 16 Linux) |
| 17 URL=https://dl.google.com/android/repository/android-ndk-r12b-linux-
x86_64.zip |
| 18 ;; |
| 19 *) |
| 20 exit 1 |
| 21 ;; |
| 22 esac |
| 23 if [ ! -f "third_party/android-ndk.zip" ]; then |
| 24 echo "Downloading NDK..." |
| 25 wget $URL -O third_party/android-ndk.zip |
| 26 fi |
| 27 if [ ! -d "third_party/android-ndk-r12b" ]; then |
| 28 echo "Unzipping NDK" |
| 29 unzip -q third_party/android-ndk.zip |
| 30 fi |
| 31 ANDROID_NDK_ROOT=`pwd`/third_party/android-ndk-r12b |
| 32 fi |
| 33 |
| 34 for file in cross/*.in ; do |
| 35 outfile=`dirname $file`/`basename $file .in` |
| 36 sed s#@ANDROID_NDK_ROOT@#$ANDROID_NDK_ROOT#g < $file > $outfile |
| 37 done |
| 38 |
| 39 popd |
| 40 |
| 41 echo |
| 42 echo "Please do this before proceeding:" |
| 43 echo "export ANDROID_NDK_ROOT=$ANDROID_NDK_ROOT" |
| 44 |
OLD | NEW |