File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -23,6 +23,7 @@ retry=1
2323remove_cache=false
2424all_channel=false
2525customized_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
148150ARGUMENT=(" ${@ } " )
149151OPTS=" a:dghr:sctm:l:w:"
150- OPTL=" help,remove-cache"
152+ OPTL=" help,remove-cache,noconfirm "
151153if ! OPT=$( getopt -o ${OPTS} -l ${OPTL} -- " ${ARGUMENT[@]} " ) ; then
152154 exit 1
153155fi
@@ -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}"
257263share_options+=(" --work" " ${work_dir} " )
258264
259265msg_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
264272trap ' trap_exit' 1 2 3 15
You can’t perform that action at this time.
0 commit comments