File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -162,19 +162,31 @@ trap_exit() {
162162
163163
164164build () {
165+ local _exit_code=0
166+
165167 options=" ${share_options} -a ${arch} ${cha} "
166168
167169 if [[ ! -e " ${work_dir} /fullbuild.${cha} _${arch} " ]]; then
168170 _msg_info " Build ${cha} with ${arch} architecture."
169171 sudo bash ${script_path} /build.sh ${options}
170- touch " ${work_dir} /fullbuild.${cha} _${arch} "
172+ _exit_code=" ${?} "
173+ if [[ " ${_exit_code} " = 0 ]]; then
174+ touch " ${work_dir} /fullbuild.${cha} _${arch} "
175+ else
176+ _msg_error " build.sh finished with exit code ${_exit_code} . Will try again."
177+ fi
171178 fi
172179 sudo pacman -Sccc --noconfirm > /dev/null 2>&1
173180
174181 if [[ ! -e " ${work_dir} /fullbuild.${cha} _${arch} _jp" ]]; then
175182 _msg_info " Build the Japanese version of ${cha} on the ${arch} architecture."
176183 sudo bash ${script_path} /build.sh -j ${options}
177- touch " ${work_dir} /fullbuild.${cha} _${arch} _jp"
184+ _exit_code=" ${?} "
185+ if [[ " ${_exit_code} " = 0 ]]; then
186+ touch " ${work_dir} /fullbuild.${cha} _${arch} _jp"
187+ else
188+ _msg_error " build.sh finished with exit code ${_exit_code} . Will try again."
189+ fi
178190 fi
179191 sudo pacman -Sccc --noconfirm > /dev/null 2>&1
180192}
You can’t perform that action at this time.
0 commit comments