Fix `make setup` on macOS.

Before, it always downloaded linux NDK no matter which platform you are
using. This way, `make setup` was actually able to break Android build
on macOS.

Signed-off-by: Igor Mandrigin <i@mandrigin.ru>
This commit is contained in:
Igor Mandrigin 2018-09-13 12:30:59 +02:00
parent c61200f9ae
commit 710c10faa4
No known key found for this signature in database
GPG Key ID: 4A0EDDE26E66BC8B
1 changed files with 7 additions and 1 deletions

View File

@ -325,7 +325,13 @@ function install_android_ndk() {
local _ndkParentDir=~/Android/Sdk
mkdir -p $_ndkParentDir
cecho "@cyan[[Downloading Android NDK.]]"
wget --output-document=android-ndk.zip https://dl.google.com/android/repository/android-ndk-r10e-linux-x86_64.zip && \
PLATFORM="linux"
if [ "$(uname)" == "Darwin" ]; then # we run osx
PLATFORM="darwin"
fi
wget --output-document=android-ndk.zip https://dl.google.com/android/repository/android-ndk-r10e-$PLATFORM-x86_64.zip && \
cecho "@cyan[[Extracting Android NDK to $_ndkParentDir.]]" && \
unzip -q -o android-ndk.zip -d "$_ndkParentDir" && \
rm -f android-ndk.zip && \