diff --git a/builds/qt-android/build.sh b/builds/qt-android/build.sh index c6107a49..8f2c19f3 100755 --- a/builds/qt-android/build.sh +++ b/builds/qt-android/build.sh @@ -16,8 +16,15 @@ android_build_opts # Use a temporary build directory cache="/tmp/android_build/${TOOLCHAIN_NAME}" +rm -rf "${cache}" mkdir -p "${cache}" +# Check for environment variable to clear the prefix and do a clean build +if [[ $ANDROID_BUILD_CLEAN ]]; then + echo "Doing a clean build (removing previous build and depedencies)..." + rm -rf "${ANDROID_BUILD_PREFIX}"/* +fi + ## # Build libsodium from latest release tarball