build() {
+ local _exit_code=0
+
options="${share_options} -a ${arch} ${cha}"
if [[ ! -e "${work_dir}/fullbuild.${cha}_${arch}" ]]; then
_msg_info "Build ${cha} with ${arch} architecture."
sudo bash ${script_path}/build.sh ${options}
- touch "${work_dir}/fullbuild.${cha}_${arch}"
+ _exit_code="${?}"
+ if [[ "${_exit_code}" = 0 ]]; then
+ touch "${work_dir}/fullbuild.${cha}_${arch}"
+ else
+ _msg_error "build.sh finished with exit code ${_exit_code}. Will try again."
+ fi
fi
sudo pacman -Sccc --noconfirm > /dev/null 2>&1
if [[ ! -e "${work_dir}/fullbuild.${cha}_${arch}_jp" ]]; then
_msg_info "Build the Japanese version of ${cha} on the ${arch} architecture."
sudo bash ${script_path}/build.sh -j ${options}
- touch "${work_dir}/fullbuild.${cha}_${arch}_jp"
+ _exit_code="${?}"
+ if [[ "${_exit_code}" = 0 ]]; then
+ touch "${work_dir}/fullbuild.${cha}_${arch}_jp"
+ else
+ _msg_error "build.sh finished with exit code ${_exit_code}. Will try again."
+ fi
fi
sudo pacman -Sccc --noconfirm > /dev/null 2>&1
}