Skip to content

Commit f07919b

Browse files
committed
Merge pull request kivy#49 from nklever/patch-2
hide "set -x" into an option
2 parents a80b943 + f76de96 commit f07919b

File tree

1 file changed

+11
-3
lines changed

1 file changed

+11
-3
lines changed

distribute.sh

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@ CBLUE="\x1b[34;01m"
6262
CGRAY="\x1b[30;01m"
6363
CRESET="\x1b[39;49;00m"
6464
DO_CLEAN_BUILD=0
65+
DO_SET_X=0
6566

6667
# Use ccache ?
6768
which ccache &>/dev/null
@@ -71,8 +72,6 @@ if [ $? -eq 0 ]; then
7172
export NDK_CCACHE="ccache"
7273
fi
7374

74-
set -x
75-
7675
function try () {
7776
"$@" || exit -1
7877
}
@@ -209,6 +208,7 @@ function usage() {
209208
echo " -l Show a list of available modules"
210209
echo " -m 'mod1 mod2' Modules to include"
211210
echo " -f Restart from scratch (remove the current build)"
211+
echo " -x display expanded values (execute 'set -x')"
212212
echo
213213
exit 0
214214
}
@@ -614,7 +614,7 @@ function arm_deduplicate() {
614614

615615

616616
# Do the build
617-
while getopts ":hvlfm:d:s" opt; do
617+
while getopts ":hvlfxm:d:s" opt; do
618618
case $opt in
619619
h)
620620
usage
@@ -637,6 +637,9 @@ while getopts ":hvlfm:d:s" opt; do
637637
f)
638638
DO_CLEAN_BUILD=1
639639
;;
640+
x)
641+
DO_SET_X=1
642+
;;
640643
\?)
641644
echo "Invalid option: -$OPTARG" >&2
642645
exit 1
@@ -652,4 +655,9 @@ while getopts ":hvlfm:d:s" opt; do
652655
esac
653656
done
654657

658+
if [ $DO_SET_X -eq 1 ]; then
659+
info "Set -x for displaying expanded values"
660+
set -x
661+
fi
662+
655663
run

0 commit comments

Comments
 (0)