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`::
100
100
-h Show this help
101
101
-l Show a list of available modules
102
102
-m 'mod1 mod2' Modules to include
103
+ -f Restart from scratch (remove the current build)
103
104
104
105
Step 2: package your application
105
106
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Original file line number Diff line number Diff line change @@ -24,6 +24,7 @@ CRED="\x1b[31;01m"
24
24
CBLUE=" \x1b[34;01m"
25
25
CGRAY=" \x1b[30;01m"
26
26
CRESET=" \x1b[39;49;00m"
27
+ DO_CLEAN_BUILD=0
27
28
28
29
# Use ccache ?
29
30
which ccache & > /dev/null
@@ -144,6 +145,7 @@ function usage() {
144
145
echo " -h Show this help"
145
146
echo " -l Show a list of available modules"
146
147
echo " -m 'mod1 mod2' Modules to include"
148
+ echo " -f Restart from scratch (remove the current build)"
147
149
echo
148
150
exit 0
149
151
}
@@ -210,6 +212,13 @@ function run_prepare() {
210
212
fi
211
213
try mkdir -p " $DIST_PATH "
212
214
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
+
213
222
# create initial files
214
223
echo " target=android-$ANDROIDAPI " > $SRC_PATH /default.properties
215
224
echo " sdk.dir=$ANDROIDSDK " > $SRC_PATH /local.properties
@@ -502,7 +511,7 @@ function list_modules() {
502
511
}
503
512
504
513
# Do the build
505
- while getopts " :hvlm :d:" opt; do
514
+ while getopts " :hvlfm :d:" opt; do
506
515
case $opt in
507
516
h)
508
517
usage
@@ -516,6 +525,9 @@ while getopts ":hvlm:d:" opt; do
516
525
d)
517
526
DIST_PATH=" $ROOT_PATH /dist/$OPTARG "
518
527
;;
528
+ f)
529
+ DO_CLEAN_BUILD=1
530
+ ;;
519
531
\? )
520
532
echo " Invalid option: -$OPTARG " >&2
521
533
exit 1
You can’t perform that action at this time.
0 commit comments