forked from len0rd/rockbox
Android tools: Allow discovery of download URLs
Automatically discover the latest and greatest version of the Android SDK and NDK by fetching it from the index. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30334 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
fca9518fa4
commit
82fa47dd06
1 changed files with 14 additions and 14 deletions
|
@ -6,32 +6,32 @@
|
||||||
# it stopped
|
# it stopped
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
# http://developer.android.com/sdk/index.html
|
SDK_DOWNLOAD_URL="http://developer.android.com/sdk/index.html"
|
||||||
SDK_URL_LNX="http://dl.google.com/android/android-sdk_r11-linux_x86.tgz"
|
NDK_DOWNLOAD_URL="http://developer.android.com/sdk/ndk/index.html"
|
||||||
SDK_URL_MAC="http://dl.google.com/android/android-sdk_r11-mac_x86.zip"
|
|
||||||
SDK_URL_WIN="http://dl.google.com/android/android-sdk_r11-windows.zip"
|
find_url() {
|
||||||
# http://developer.android.com/sdk/ndk/index.html
|
base_url="$1"
|
||||||
NDK_URL_LNX="http://dl.google.com/android/ndk/android-ndk-r5c-linux-x86.tar.bz2"
|
os="$2"
|
||||||
NDK_URL_MAC="http://dl.google.com/android/ndk/android-ndk-r5c-darwin-x86.tar.bz2"
|
wget -q -O - $base_url | grep dl.google.com | sed 's/.*"\(http:\/\/.*\)".*/\1/' | grep $os | grep -v .exe # Windows hack
|
||||||
NDK_URL_WIN="http://dl.google.com/android/ndk/android-ndk-r5c-windows.zip"
|
}
|
||||||
|
|
||||||
OS=`uname`
|
OS=`uname`
|
||||||
case $OS in
|
case $OS in
|
||||||
Linux)
|
Linux)
|
||||||
SDK_URL=$SDK_URL_LNX
|
SDK_URL=$(find_url $SDK_DOWNLOAD_URL linux)
|
||||||
NDK_URL=$NDK_URL_LNX
|
NDK_URL=$(find_url $NDK_DOWNLOAD_URL linux)
|
||||||
ANDROID=tools/android
|
ANDROID=tools/android
|
||||||
;;
|
;;
|
||||||
|
|
||||||
Darwin)
|
Darwin)
|
||||||
SDK_URL=$SDK_URL_MAC
|
SDK_URL=$(find_url $SDK_DOWNLOAD_URL mac)
|
||||||
NDK_URL=$NDK_URL_MAC
|
NDK_URL=$(find_url $NDK_DOWNLOAD_URL darwin)
|
||||||
ANDROID=tools/android
|
ANDROID=tools/android
|
||||||
;;
|
;;
|
||||||
|
|
||||||
CYGWIN*)
|
CYGWIN*)
|
||||||
SDK_URL=$SDK_URL_WIN
|
SDK_URL=$(find_url $SDK_DOWNLOAD_URL windows)
|
||||||
NDK_URL=$NDK_URL_WIN
|
NDK_URL=$(find_url $NDK_DOWNLOAD_URL windows)
|
||||||
ANDROID=tools/android.bat
|
ANDROID=tools/android.bat
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue