6 |
|
|
7 |
source ${BUILDSERVER_LIB_DIR}/buildserver-functions.sh |
source ${BUILDSERVER_LIB_DIR}/buildserver-functions.sh |
8 |
|
|
9 |
# override |
FORCE=0 |
10 |
#BUILDROOT="/mnt/test-buildroot" |
if [[ $1 = --force ]] |
11 |
#BUILD_ARCH=( x86_64 i686 ) |
then |
12 |
#BUILDROOT_PROFILE="R11" |
FORCE=1 |
13 |
#SMAGE_SVN_REPO="svn://cvs.magellan-linux.de/smage/trunk" |
fi |
|
#MAGE_SVN_REPO="svn://cvs.magellan-linux.de/mage/trunk" |
|
14 |
|
|
15 |
if [ ! -f ${BUILDROOT}/.stamps/mage_svn-checkout-ok ] |
if [ ! -f ${BUILDROOT}/.stamps/mage_svn-checkout-ok ] |
16 |
then |
then |
21 |
die "svn checkout of smage required. run buildserver-svn first." |
die "svn checkout of smage required. run buildserver-svn first." |
22 |
fi |
fi |
23 |
|
|
24 |
# create buildroot layout |
for arch in $(enum-all-arch-types) |
|
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 |
|
25 |
do |
do |
26 |
if [ -d ${BUILDROOT}/${arch}/usr/mage ] |
if [ ! -f ${BUILDROOT}/.stamps/${arch}_initial-mage-tree-ok ] || [[ ${FORCE} = 1 ]] |
27 |
then |
then |
28 |
rm -r ${BUILDROOT}/${arch}/usr/mage || die "${arch} cleaning mage tree" |
[[ ${FORCE} = 1 ]] && echo "Warning: mage-tree regen was enforced for arch '${arch}'." |
|
fi |
|
29 |
|
|
30 |
runarch "${arch}" mage regen-mage-tree || die "${arch} regen mage tree" |
# create buildroot layout |
31 |
touch ${BUILDROOT}/.stamps/${arch}_initial-mage-tree-ok |
if [ -d ${BUILDROOT}/mage-tree/${arch} ] |
32 |
|
then |
33 |
|
rm -r ${BUILDROOT}/mage-tree/${arch} || die "cleaning global mage tree tmp" |
34 |
|
install -d ${BUILDROOT}/mage-tree/${arch} || die "creating global mage tree tmp dir" |
35 |
|
fi |
36 |
|
|
37 |
|
if [ -d ${BUILDROOT}/${arch}/usr/mage ] |
38 |
|
then |
39 |
|
rm -r ${BUILDROOT}/${arch}/usr/mage || die "${arch} cleaning mage tree" |
40 |
|
fi |
41 |
|
|
42 |
|
runarch "${arch}" mage regen-mage-tree || die "${arch} regen mage tree" |
43 |
|
touch ${BUILDROOT}/.stamps/${arch}_initial-mage-tree-ok |
44 |
|
else |
45 |
|
echo "Warning: mage-tree already generated for arch '${arch}'. Run with --force switch to overwrite." |
46 |
|
fi |
47 |
done |
done |