setup-android-sdk.sh: Fix mac sdk download

This commit is contained in:
Fredrik Fornwall 2016-06-10 23:19:22 +02:00
parent 37c88ee367
commit 7073199b83

View File

@ -10,13 +10,21 @@ if [ ! -d $ANDROID_HOME ]; then
mkdir -p $ANDROID_HOME mkdir -p $ANDROID_HOME
cd $ANDROID_HOME/.. cd $ANDROID_HOME/..
rm -Rf `basename $ANDROID_HOME` rm -Rf `basename $ANDROID_HOME`
curl --fail --retry 3 -o android-sdk.tgz https://dl.google.com/android/android-sdk_r24.4.1-linux.tgz
if [ `uname` = Darwin ]; then
curl --fail --retry 3 -o android-sdk.zip https://dl.google.com/android/android-sdk_r24.4.1-macosx.zip
rm -Rf android-sdk-macosx
unzip -q android-sdk.zip
mv android-sdk-macosx `basename $ANDROID_HOME`
rm android-sdk.zip
else
curl --fail --retry 3 -o android-sdk.tgz https://dl.google.com/android/android-sdk_r24.4.1-linux.tgz
rm -Rf android-sdk-linux rm -Rf android-sdk-linux
tar xzf android-sdk.tgz tar xzf android-sdk.tgz
mv android-sdk-linux `basename $ANDROID_HOME` mv android-sdk-linux `basename $ANDROID_HOME`
rm android-sdk.tgz rm android-sdk.tgz
fi fi
fi
if [ ! -d $NDK ]; then if [ ! -d $NDK ]; then
mkdir -p $NDK mkdir -p $NDK