@@ -18,7 +18,7 @@ default_options=("--boot-splash" "--cleanup" "--user" "alter" "--password" "alte
1818
1919work_dir=" ${script_path} /work"
2020simulation=false
21- retry=5
21+ retry=1
2222
2323remove_cache=false
2424all_channel=false
@@ -100,11 +100,15 @@ build() {
100100 msg_info " Build the ${lang} version of ${cha} on the ${arch} architecture."
101101 sudo bash " ${script_path} /build.sh" " ${_options[@]} "
102102 _exit_code=" ${?} "
103- if [[ " ${ _exit_code} " = 0 ]] ; then
103+ if (( _exit_code == 0 )) ; then
104104 touch " ${fullbuild_dir} /fullbuild.${cha} _${arch} _${lang} "
105+ elif (( "${retry_count} " == "${retry} " )) ; then
106+ msg_error " Failed to build (Exit code: ${_exit_code} )"
107+ exit " ${_exit_code} "
105108 else
106109 msg_error " build.sh finished with exit code ${_exit_code} . Will try again."
107110 fi
111+
108112 fi
109113 fi
110114}
@@ -115,7 +119,7 @@ _help() {
115119 echo " General options:"
116120 echo " -a <options> Set other options in build.sh"
117121 echo " -c Build all channel (DO NOT specify the channel !!)"
118- echo " -d Use the default build.sh arguments. (${[ default_options[*]} )"
122+ echo " -d Use the default build.sh arguments. (${default_options[*]} )"
119123 echo " -g Use gitversion"
120124 echo " -h | --help This help message"
121125 echo " -l <locale> Set the locale to build"
267271for arch in ${architectures[@]} ; do
268272 for cha in ${channnels[@]} ; do
269273 for lang in ${locale_list[@]} ; do
270- for i in $( seq 1 ${retry} ) ; do
274+ for retry_count in $( seq 1 ${retry} ) ; do
271275 if [[ -n $( cat " ${script_path} /channels/${cha} /architecture" | grep -h -v ^' #' | grep -x " ${arch} " ) ]]; then
272276 build
273277 fi
0 commit comments