Diff

Differences From Artifact [ee8824e5b2]:

To Artifact [6465223bf6]:


   222    222   			cd "${pkg}" >/dev/null 2>/dev/null || exit 1
   223    223   
   224    224   			build_script='./build.sh'
   225    225   			if [ -x 'kitcreator-build.sh' ]; then
   226    226   				build_script='./kitcreator-build.sh'
   227    227   			fi
   228    228   
   229         -			if useCommonBuildSystem "${build_script}"; then
   230         -				(
   231         -					. ../common/common.sh
   232         -					. "${build_script}"
   233         -
   234         -					set -x
   235         -
   236         -					init || die 'init failed'
   237         -
   238         -					predownload || die 'predownload failed'
   239         -					download || die 'download failed'
   240         -					postdownload || die 'postdownload failed'
          229  +			if [ -f "${build_script}" ]; then
          230  +				build_scripts=("${build_script}")
          231  +			else
          232  +				build_scripts=($(echo build-kitcreator-*.sh))
          233  +			fi
          234  +
          235  +			call_pkg_init='1'
          236  +			for build_script in "${build_scripts[@]}"; do
          237  +				if useCommonBuildSystem "${build_script}"; then
          238  +					(
          239  +						. ../common/common.sh
          240  +						. "${build_script}"
          241  +
          242  +						set -x
          243  +
          244  +						if [ "${call_pkg_init}" = '1' ]; then
          245  +							init || die 'init failed'
          246  +						fi
          247  +
          248  +						predownload || die 'predownload failed'
          249  +						download || die 'download failed'
          250  +						postdownload || die 'postdownload failed'
          251  +
          252  +						extract || die 'extract failed'
          253  +
          254  +						apply_patches || die 'apply patches failed'
          255  +
          256  +						cd "${workdir}" || exit 1
          257  +
          258  +						preconfigure || die 'preconfigure failed'
          259  +						configure || die 'configure failed'
          260  +						postconfigure || die 'postconfigure failed'
          261  +
          262  +						prebuild || die 'prebuild failed'
          263  +						build || die 'build failed'
          264  +						postbuild || die 'postbuild failed'
          265  +
          266  +						preinstall || die 'preinstall failed'
          267  +						install || die 'install failed'
          268  +						postinstall || die 'postinstall failed'
          269  +
          270  +						createruntime || die 'createruntime failed'
          271  +
          272  +						set +x
   241    273   
   242         -					extract || die 'extract failed'
   243         -
   244         -					apply_patches || die 'apply patches failed'
   245         -
   246         -					cd "${workdir}" || exit 1
   247         -
   248         -					preconfigure || die 'preconfigure failed'
   249         -					configure || die 'configure failed'
   250         -					postconfigure || die 'postconfigure failed'
          274  +						rm -rf "${workdir}"
          275  +					) 3>&1 4>&2 >> build.log 2>&1 || exit 1
          276  +				else
          277  +					"${build_script}" 3>&1 4>&2 >> build.log 2>&1 || exit 1
          278  +				fi
   251    279   
   252         -					prebuild || die 'prebuild failed'
   253         -					build || die 'build failed'
   254         -					postbuild || die 'postbuild failed'
   255         -
   256         -					preinstall || die 'preinstall failed'
   257         -					install || die 'install failed'
   258         -					postinstall || die 'postinstall failed'
   259         -
   260         -					createruntime || die 'createruntime failed'
   261         -
   262         -					set +x
   263         -
   264         -					rm -rf "${workdir}"
   265         -				) 3>&1 4>&2 > build.log 2>&1 || exit 1
   266         -			else
   267         -				"${build_script}" 3>&1 4>&2 >> build.log 2>&1 || exit 1
   268         -			fi
          280  +				call_pkg_init='0'
          281  +			done
   269    282   		) || failed="1"
   270    283   	fi
   271    284   
   272    285   	if [ "${failed}" = "1" ]; then
   273    286   		echo " failed."
   274    287   		failedpkgs="${failedpkgs} ${pkg}"
   275    288   	else