Use https for downloading the android ndk

This commit is contained in:
Fredrik Fornwall 2018-08-27 22:25:51 +02:00
parent fc54a3214c
commit 89f52767c0
1 changed files with 5 additions and 2 deletions

View File

@ -6,9 +6,10 @@ set -e -u
test -f $HOME/.termuxrc && . $HOME/.termuxrc
: ${ANDROID_HOME:="${HOME}/lib/android-sdk"}
: ${NDK:="${HOME}/lib/android-ndk"}
ANDROID_SDK_FILE=sdk-tools-linux-4333796.zip
ANDROID_SDK_SHA256=92ffee5a1d98d856634e8b71132e8a95d96c83a63fde1099be3d86df3106def9
ANDROID_NDK_FILE=android-ndk-r${TERMUX_NDK_VERSION}-$(uname)-x86_64.zip
ANDROID_NDK_FILE=android-ndk-r${TERMUX_NDK_VERSION}-Linux-x86_64.zip
ANDROID_NDK_SHA256=ba3d813b47de75bc32a2f3de087f72599c6cb36fdc9686b96f517f5492ff43ca
if [ ! -d $ANDROID_HOME ]; then
@ -18,6 +19,7 @@ if [ ! -d $ANDROID_HOME ]; then
# https://developer.android.com/studio/index.html#command-tools
# The downloaded version below is 26.1.1.:
echo "Downloading android sdk..."
curl --fail --retry 3 \
-o tools.zip \
https://dl.google.com/android/repository/${ANDROID_SDK_FILE}
@ -31,8 +33,9 @@ if [ ! -d $NDK ]; then
mkdir -p $NDK
cd $NDK/..
rm -Rf `basename $NDK`
echo "Downloading android ndk..."
curl --fail --retry 3 -o ndk.zip \
http://dl.google.com/android/repository/${ANDROID_NDK_FILE}
https://dl.google.com/android/repository/${ANDROID_NDK_FILE}
echo "${ANDROID_NDK_SHA256} ndk.zip" | sha256sum -c -
rm -Rf android-ndk-r$TERMUX_NDK_VERSION
unzip -q ndk.zip