From 4262e648eb3adbd502ea57319d3fd27103a4f267 Mon Sep 17 00:00:00 2001 From: Thomas Martitz Date: Mon, 10 Mar 2014 07:33:18 +0100 Subject: [PATCH] android: Fix installToolchain.sh script. Change-Id: I6c22043956cea5c5aec3e411045082e1a9b69442 --- android/installToolchain.sh | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/android/installToolchain.sh b/android/installToolchain.sh index 05d3d82ae8..3cdf27b9cd 100755 --- a/android/installToolchain.sh +++ b/android/installToolchain.sh @@ -12,7 +12,7 @@ NDK_DOWNLOAD_URL="http://developer.android.com/sdk/ndk/index.html" find_url() { base_url="$1" os="$2" - wget -q -O - $base_url | grep dl.google.com | sed 's/.*"\(http:\/\/.*\)".*/\1/' | grep $os | grep -v .exe # Windows hack + wget -q -O - $base_url | grep dl.google.com | sed 's/.*"\(http:\/\/.*\)".*/\1/' | grep $os | grep -v bundle | grep -v .exe # Windows hack } OS=`uname` @@ -52,14 +52,14 @@ download_and_extract() { fi echo " * Extracting $name..." - case ${local_file#*.} in - zip) + case ${local_file} in + *.zip) unzip -qo -d "$prefix" "$local_file" ;; - tgz|tar.gz) - (cd $prefix; tar -xf "$local_file") + *.tgz|*.tar.gz) + (cd $prefix; tar -xzf "$local_file") ;; - tar.bz2) + *.tar.bz2) (cd $prefix; tar -xjf "$local_file") ;; *)