summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--coin/provisioning/qtci-linux-RHEL-6.6-x86_64/android_linux.sh8
1 files changed, 7 insertions, 1 deletions
diff --git a/coin/provisioning/qtci-linux-RHEL-6.6-x86_64/android_linux.sh b/coin/provisioning/qtci-linux-RHEL-6.6-x86_64/android_linux.sh
index 7c3220ee..c278a2ce 100644
--- a/coin/provisioning/qtci-linux-RHEL-6.6-x86_64/android_linux.sh
+++ b/coin/provisioning/qtci-linux-RHEL-6.6-x86_64/android_linux.sh
@@ -87,7 +87,13 @@ function InstallAndroidPackage {
sudo rm -fr "$targetFolder"/"$version"
}
-sudo mkdir "$targetFolder"
+if [ -d "$targetFolder" ]; then
+ echo "Removing old Android installation"
+ sudo rm -fr "$targetFolder" || ( echo "Can't remove $targetFolder" ; exit 1; )
+fi
+
+sudo mkdir "$targetFolder" || ( echo "Can't create $targetFolder" ; exit 1; )
+
# Install Android SDK
echo "Installing Android SDK version $sdkPackage..."
InstallAndroidPackage "$targetFolder" $sdkPackage $sdkUrl $sdkSha1 $sdkTargetFile "$sdkExtract" $sdkFolderName $sdkName