From 498455c79ff90b373a60bccf1f50d638225c788b Mon Sep 17 00:00:00 2001 From: David 'Digit' Turner Date: Thu, 14 May 2009 16:43:03 +0200 Subject: [PATCH] Fix the build-toolchain.sh script which doesn't work due to the new download location of the NDK sources and a small typo when using wget. Also make --force-download actually work. --- .../toolchains/archive/toolchain/sources.txt | 4 ++-- ndk/build/tools/build-toolchain.sh | 18 +++++++++--------- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/ndk/build/toolchains/archive/toolchain/sources.txt b/ndk/build/toolchains/archive/toolchain/sources.txt index 033881ace..c59d51ad6 100644 --- a/ndk/build/toolchains/archive/toolchain/sources.txt +++ b/ndk/build/toolchains/archive/toolchain/sources.txt @@ -1,3 +1,3 @@ -android-toolchain-20090323.tar.bz2 +android-ndk-toolchain-20090323.tar.bz2 d56abac4df36271ae0c961d21d0847db -http://android.git.kernel.org/pub/android-toolchain-20090323.tar.bz2 \ No newline at end of file +http://android.git.kernel.org/pub/android-ndk-toolchain-20090323.tar.bz2 diff --git a/ndk/build/tools/build-toolchain.sh b/ndk/build/tools/build-toolchain.sh index e1047bd92..75de8f973 100755 --- a/ndk/build/tools/build-toolchain.sh +++ b/ndk/build/tools/build-toolchain.sh @@ -154,13 +154,6 @@ ANDROID_GDBSERVER_OUT=$OUT/gdbserver ANDROID_GDBSERVER_BUILD=$ANDROID_GDBSERVER_OUT/build ANDROID_GDBSERVER_DEST=$ANDROID_SYSROOT/usr/bin -# checks, we need more checks.. -mkdir -p $PACKAGE_OUT -if [ $? != 0 ] ; then - echo "Can't create download/archive directory for toolchain tarballs" - exit 2 -fi - # Let's check that we have a working md5sum here A_MD5=`echo "A" | md5sum | cut -d' ' -f1` if [ "$A_MD5" != "bf072e9119077b4e76437a93986787ef" ] ; then @@ -182,7 +175,7 @@ download_file () echo $1 | grep -q -e "^\(http\|https\):.*" if [ $? = 0 ] ; then if [ -n "$WGET" ] ; then - $WGET -o $2 $1 + $WGET -O $2 $1 elif [ -n "$CURL" ] ; then $CURL -o $2 $1 else @@ -352,7 +345,7 @@ unpack_package () } if [ $OPTION_FORCE_DOWNLOAD ] ; then - rm -rf $ANDROID_TOOLCHAIN_SRC + rm -rf $PACKAGE_OUT $ANDROID_TOOLCHAIN_SRC timestamp_force toolchain unpack timestamp_force toolchain verify fi @@ -363,6 +356,13 @@ if [ $OPTION_FORCE_BUILD ] ; then timestamp_clear gdbserver fi +# checks, we need more checks.. +mkdir -p $PACKAGE_OUT +if [ $? != 0 ] ; then + echo "Can't create download/archive directory for toolchain tarballs" + exit 2 +fi + download_package toolchain unpack_package toolchain $ANDROID_TOOLCHAIN_SRC