--- trunk/mage-buildserver/buildserver-functions.sh 2014/08/28 09:08:32 2774 +++ trunk/mage-buildserver/buildserver-functions.sh 2014/08/28 09:10:04 2775 @@ -79,3 +79,39 @@ # never fail return 0 } + +enum-build-arch-types() +{ + echo "${BUILD_ARCH[*]}" +} + +enum-all-arch-types() +{ + local arch + local build_arch_types + + for arch in src ${BUILD_ARCH[*]} + do + if [ ! -e ${BUILDSERVER_CONFIG_DIR}/profiles/${BUILDROOT_PROFILE}/${arch}/mage.rc ] + then + echo "Warning: mage.rc of '${arch}' not found. Arch '${arch}' ignored." >&2 + else + build_arch_types+=( "${arch}" ) + fi + done + + if [[ ${BUILD_PLAYGROUND} -eq 1 ]] + then + for arch in ${BUILD_ARCH[*]} + do + if [ ! -e ${BUILDSERVER_CONFIG_DIR}/profiles/${BUILDROOT_PROFILE}/playground-${arch}/mage.rc ] + then + echo "Warning: mage.rc of 'playground-${arch}' not found. Arch 'playground-${arch}' ignored." >&2 + else + build_arch_types+=( "playground-${arch}" ) + fi + done + fi + + echo "${build_arch_types[*]}" +}