2014-11-02 17:33:23 -08:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
|
2020-08-14 16:49:14 +02:00
|
|
|
export NDK_VERSION=android-ndk-r21d
|
2020-02-12 12:14:32 +01:00
|
|
|
export ANDROID_NDK_ROOT="/tmp/${NDK_VERSION}"
|
2015-08-01 18:46:32 +01:00
|
|
|
|
2020-02-12 12:14:32 +01:00
|
|
|
case $(uname | tr '[:upper:]' '[:lower:]') in
|
|
|
|
linux*)
|
2019-10-25 20:02:34 +02:00
|
|
|
HOST_PLATFORM=linux-x86_64
|
2020-02-12 12:14:32 +01:00
|
|
|
;;
|
|
|
|
darwin*)
|
2019-10-25 20:02:34 +02:00
|
|
|
HOST_PLATFORM=darwin-x86_64
|
2020-02-12 12:14:32 +01:00
|
|
|
;;
|
|
|
|
*)
|
|
|
|
echo "Unsupported platform"
|
2015-08-01 18:46:32 +01:00
|
|
|
exit 1
|
2020-02-12 12:14:32 +01:00
|
|
|
;;
|
|
|
|
esac
|
2015-08-01 18:46:32 +01:00
|
|
|
|
2020-02-12 12:14:32 +01:00
|
|
|
if [ ! -d "${ANDROID_NDK_ROOT}" ]; then
|
2019-10-28 16:06:21 +01:00
|
|
|
export FILENAME=$NDK_VERSION-$HOST_PLATFORM.zip
|
2015-08-01 18:46:32 +01:00
|
|
|
|
2019-10-28 16:06:21 +01:00
|
|
|
(cd '/tmp' \
|
2020-02-12 12:14:32 +01:00
|
|
|
&& wget http://dl.google.com/android/repository/$FILENAME -O $FILENAME &> /dev/null \
|
2019-10-28 16:06:21 +01:00
|
|
|
&& unzip -q $FILENAME) || exit 1
|
|
|
|
unset FILENAME
|
|
|
|
fi
|
2014-11-02 17:33:23 -08:00
|
|
|
|
2020-02-12 12:14:32 +01:00
|
|
|
./build.sh "arm"
|
|
|
|
./build.sh "arm64"
|
|
|
|
./build.sh "x86"
|
|
|
|
./build.sh "x86_64"
|