Skip to content

Commit 1f83108

Browse files
committed
[update] : Added --noconfirm
1 parent b9f9a60 commit 1f83108

1 file changed

Lines changed: 11 additions & 3 deletions

File tree

tools/fullbuild.sh

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ retry=1
2323
remove_cache=false
2424
all_channel=false
2525
customized_work=false
26+
noconfirm=false
2627

2728
# Show an INFO message
2829
# $1: message string
@@ -131,6 +132,7 @@ _help() {
131132
echo " -w <dir> Set the work dir"
132133
echo
133134
echo " --remove-cache Clear cache for all packages on every build"
135+
echo " --noconfirm Run without confirmation"
134136
echo
135137
echo " !! WARNING !!"
136138
echo " Do not set channel or architecture with -a."
@@ -147,7 +149,7 @@ share_options+=("--noconfirm")
147149
# Parse options
148150
ARGUMENT=("${@}")
149151
OPTS="a:dghr:sctm:l:w:"
150-
OPTL="help,remove-cache"
152+
OPTL="help,remove-cache,noconfirm"
151153
if ! OPT=$(getopt -o ${OPTS} -l ${OPTL} -- "${ARGUMENT[@]}"); then
152154
exit 1
153155
fi
@@ -210,6 +212,10 @@ while true; do
210212
remove_cache=true
211213
shift 1
212214
;;
215+
--noconfirm)
216+
noconfirm=true
217+
shift 1
218+
;;
213219
--)
214220
shift 1
215221
break
@@ -257,8 +263,10 @@ mkdir -p "${fullbuild_dir}"
257263
share_options+=("--work" "${work_dir}")
258264

259265
msg_info "Options: ${share_options[*]}"
260-
msg_info "Press Enter to continue or Ctrl + C to cancel."
261-
read
266+
if [[ "${noconfirm}" = false ]]; then
267+
msg_info "Press Enter to continue or Ctrl + C to cancel."
268+
read
269+
fi
262270

263271

264272
trap 'trap_exit' 1 2 3 15

0 commit comments

Comments
 (0)