@@ -15,6 +15,8 @@ architectures=("x86_64" "i686")
1515locale_list=(" ja" " en" )
1616share_options=()
1717default_options=(" --boot-splash" " --cleanup" " --user" " alter" " --password" " alter" )
18+ failed=()
19+ abort=false
1820
1921work_dir=" ${script_path} /work"
2022simulation=false
@@ -83,7 +85,11 @@ build() {
8385 touch " ${fullbuild_dir} /fullbuild.${cha} _${arch} _${lang} "
8486 elif (( "${retry_count} " == "${retry} " )) ; then
8587 msg_error " Failed to build (Exit code: ${_exit_code} )"
86- exit " ${_exit_code} "
88+ if [[ " ${abort} " = true ]]; then
89+ exit " ${_exit_code} "
90+ else
91+ failed+=(" ${cha} -${arch} -${lang} " )
92+ fi
8793 else
8894 msg_error " build.sh finished with exit code ${_exit_code} . Will try again."
8995 fi
@@ -99,6 +105,7 @@ _help() {
99105 echo " -a <options> Set other options in build.sh"
100106 echo " -c Build all channel (DO NOT specify the channel !!)"
101107 echo " -d Use the default build.sh arguments. (${default_options[*]} )"
108+ echo " -e Exit the script when the build fails"
102109 echo " -g Use gitversion"
103110 echo " -h | --help This help message"
104111 echo " -l <locale> Set the locale to build"
@@ -126,7 +133,7 @@ share_options+=("--noconfirm")
126133
127134# Parse options
128135ARGUMENT=(" ${@ } " )
129- OPTS=" a:dghr :sctm:l:w:"
136+ OPTS=" a:deghr :sctm:l:w:"
130137OPTL=" help,remove-cache,noconfirm"
131138if ! OPT=$( getopt -o ${OPTS} -l ${OPTL} -- " ${ARGUMENT[@]} " ) ; then
132139 exit 1
@@ -148,6 +155,10 @@ while true; do
148155 share_options+=(" ${default_options[@]} " )
149156 shift 1
150157 ;;
158+ -e)
159+ abort=true
160+ shift 1
161+ ;;
151162 -m)
152163 architectures=(${2} )
153164 shift 2
@@ -263,5 +274,10 @@ done
263274
264275
265276if [[ " ${simulation} " = false ]]; then
266- msg_info " All editions have been built"
277+ if (( "${# failed[@]} " == 0 )) ; then
278+ msg_info " All editions have been built"
279+ else
280+ msg_error " Build of the following settings failed"
281+ printf " - %s\n" " ${failed[@]} "
282+ fi
267283fi
0 commit comments