1 |
#!/bin/bash |
#!/bin/bash |
2 |
# $Header: /home/cvsd/magellan-cvs/magellan-src/bootstrap/scripts/mage-bootstrap.sh,v 1.6 2007-01-22 21:46:31 niro Exp $ |
# $Header: /home/cvsd/magellan-cvs/magellan-src/bootstrap/scripts/mage-bootstrap.sh,v 1.8 2008-06-23 19:26:40 niro Exp $ |
3 |
|
|
4 |
TOOLCHAIN="" |
TOOLCHAIN="" |
5 |
BASESYSTEM="" |
BASESYSTEM="" |
55 |
local SMAGE2RSYNC |
local SMAGE2RSYNC |
56 |
|
|
57 |
# sanity checks |
# sanity checks |
58 |
|
[ -f /etc/mage.rc.global ] && source /etc/mage.rc.global || \ |
59 |
|
die "get_value_from_magefile: /etc/mage.rc.global not found." |
60 |
[ -f ${magerc} ] && source ${magerc} || \ |
[ -f ${magerc} ] && source ${magerc} || \ |
61 |
die "get_value_from_magefile: ${magerc} not found." |
die "get_value_from_magefile: ${magerc} not found." |
62 |
[ -z "${var}" ] && die "get_value_from_magefile: \$var not given." |
[ -z "${var}" ] && die "get_value_from_magefile: \$var not given." |
185 |
ln -snf ${MY_MAGEDIR}/profiles/${PROFILE} /etc/mage-profile || die "link profile" |
ln -snf ${MY_MAGEDIR}/profiles/${PROFILE} /etc/mage-profile || die "link profile" |
186 |
|
|
187 |
# update mage tree |
# update mage tree |
188 |
mage update || die "update mage-tree" |
MAGERC="${MAGERC}" mage update || die "update mage-tree" |
189 |
|
|
190 |
# now get the toolchain and the basesystem layout file |
# now get the toolchain and the basesystem layout file |
191 |
# [ -z "${TOOLCHAIN}" ] && TOOLCHAIN="toolchain.defaults" |
# [ -z "${TOOLCHAIN}" ] && TOOLCHAIN="toolchain.defaults" |
196 |
|
|
197 |
# this way toolchain and basesystem can be packages; |
# this way toolchain and basesystem can be packages; |
198 |
# only if nothing set the layout files from the profile will be taken |
# only if nothing set the layout files from the profile will be taken |
199 |
[ -z "${TOOLCHAIN}" ] && TOOLCHAIN="$(< /etc/mage-profile/toolchain.defaults)" |
[ -z "${TOOLCHAIN}" ] && TOOLCHAIN="$(< ${MY_MAGEDIR}/profiles/${PROFILE}/toolchain.defaults)" |
200 |
[ -z "${BASESYSTEM}" ] && BASESYSTEM="$(< /etc/mage-profile/basesystem.defaults)" |
[ -z "${BASESYSTEM}" ] && BASESYSTEM="$(< ${MY_MAGEDIR}/profiles/${PROFILE}/basesystem.defaults)" |
201 |
|
|
202 |
# install toolchain |
# install toolchain |
203 |
CONFIG_PROTECT="-*" MROOT="${MROOT}" MAGERC="${MAGERC}" mage install ${TOOLCHAIN} || die "toolchain install" |
CONFIG_PROTECT="-*" MROOT="${MROOT}" MAGERC="${MAGERC}" mage install ${TOOLCHAIN} || die "toolchain install" |