File tree Expand file tree Collapse file tree 2 files changed +14
-1
lines changed
Expand file tree Collapse file tree 2 files changed +14
-1
lines changed Original file line number Diff line number Diff line change @@ -100,6 +100,7 @@ Available options to `distribute.sh`::
100100 -h Show this help
101101 -l Show a list of available modules
102102 -m 'mod1 mod2' Modules to include
103+ -f Restart from scratch (remove the current build)
103104
104105Step 2: package your application
105106~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Original file line number Diff line number Diff line change @@ -24,6 +24,7 @@ CRED="\x1b[31;01m"
2424CBLUE=" \x1b[34;01m"
2525CGRAY=" \x1b[30;01m"
2626CRESET=" \x1b[39;49;00m"
27+ DO_CLEAN_BUILD=0
2728
2829# Use ccache ?
2930which ccache & > /dev/null
@@ -144,6 +145,7 @@ function usage() {
144145 echo " -h Show this help"
145146 echo " -l Show a list of available modules"
146147 echo " -m 'mod1 mod2' Modules to include"
148+ echo " -f Restart from scratch (remove the current build)"
147149 echo
148150 exit 0
149151}
@@ -210,6 +212,13 @@ function run_prepare() {
210212 fi
211213 try mkdir -p " $DIST_PATH "
212214
215+ if [ $DO_CLEAN_BUILD -eq 1 ]; then
216+ info " Cleaning build"
217+ try rm -rf $BUILD_PATH
218+ try rm -rf $SRC_PATH /obj
219+ try rm -rf $SRC_PATH /libs
220+ fi
221+
213222 # create initial files
214223 echo " target=android-$ANDROIDAPI " > $SRC_PATH /default.properties
215224 echo " sdk.dir=$ANDROIDSDK " > $SRC_PATH /local.properties
@@ -502,7 +511,7 @@ function list_modules() {
502511}
503512
504513# Do the build
505- while getopts " :hvlm :d:" opt; do
514+ while getopts " :hvlfm :d:" opt; do
506515 case $opt in
507516 h)
508517 usage
@@ -516,6 +525,9 @@ while getopts ":hvlm:d:" opt; do
516525 d)
517526 DIST_PATH=" $ROOT_PATH /dist/$OPTARG "
518527 ;;
528+ f)
529+ DO_CLEAN_BUILD=1
530+ ;;
519531 \? )
520532 echo " Invalid option: -$OPTARG " >&2
521533 exit 1
You can’t perform that action at this time.
0 commit comments