#!/bin/bash # get configuration BUILDSERVER_CONFIG_DIR="/etc/mage-buildserver" source ${BUILDSERVER_CONFIG_DIR}/buildserver.conf source ${BUILDSERVER_LIB_DIR}/buildserver-functions.sh if [ ! -f ${BUILDROOT}/.stamps/mage_svn-checkout-ok ] then die "svn checkout of mage required. run buildserver-svn first." fi if [ ! -f ${BUILDROOT}/.stamps/smage_svn-checkout-ok ] then die "svn checkout of smage required. run buildserver-svn first." fi # create buildroot layout if [ -d ${BUILDROOT}/tmp/mage-tree ] then rm -r ${BUILDROOT}/tmp/mage-tree || die "cleaning global mage tree tmp" install -d ${BUILDROOT}/tmp/mage-tree || die "creating global mage tree tmp dir" fi for arch in ${BUILD_ARCH[*]} src do if [ -d ${BUILDROOT}/${arch}/usr/mage ] then rm -r ${BUILDROOT}/${arch}/usr/mage || die "${arch} cleaning mage tree" fi # create buildroot layout if [ -d ${BUILDROOT}/mage-tree/${arch} ] then rm -r ${BUILDROOT}/mage-tree/${arch} || die "cleaning global mage tree tmp" install -d ${BUILDROOT}/mage-tree/${arch} || die "creating global mage tree tmp dir" fi runarch "${arch}" mage regen-mage-tree || die "${arch} regen mage tree" touch ${BUILDROOT}/.stamps/${arch}_initial-mage-tree-ok done