summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKevin Brodsky <kevin.brodsky@linaro.org>2016-01-04 11:39:03 +0000
committerVishal Bhoj <vishal.bhoj@linaro.org>2016-01-07 16:21:39 +0530
commit53c456af244744a2de08106103575432824e22ec (patch)
tree619927de98e9ace66bc6f0c1808bff0522d5c5ea
parent539ee53ad01970fe60e732e315307406c87560c8 (diff)
Add an option to prevent cleaning build artifacts
When running in local mode, defining NO_CLEAN now prevents out/ from being wiped (a tmpfs is still used for target/product if NO_TMPFS_TARGET_PRODUCT is not defined). Change-Id: Ia14cd576d08a9014cb3e3aca27973da430da0fa9
-rwxr-xr-xsetup-android.sh4
1 files changed, 2 insertions, 2 deletions
diff --git a/setup-android.sh b/setup-android.sh
index 172dfae..db5748b 100755
--- a/setup-android.sh
+++ b/setup-android.sh
@@ -190,10 +190,10 @@ MAKE_JOBS=$cpu_count
echo "BUILDING CODE"
#Clean previous build artifacts
-rm -rf out/host/
+[[ $JENKINS_MODE || ! $NO_CLEAN ]] && rm -rf out/host
if [[ $NO_TMPFS_TARGET_PRODUCT ]]; then
- rm -rf out/target
+ [[ $JENKINS_MODE || ! $NO_CLEAN ]] && rm -rf out/target
else
# setup tmpfs since we have enough free memory
# The default is half of the memory (size=50%)