1 |
#!/bin/bash |
#!/bin/bash |
2 |
# $Header: /home/cvsd/magellan-cvs/magellan-src/bootstrap/scripts/mage-bootstrap.sh,v 1.7 2008-03-20 11:55:44 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="" |
8 |
ABORT_AFTER_STAGE1=false |
ABORT_AFTER_STAGE1=false |
9 |
MY_MAGEDIR="" |
MY_MAGEDIR="" |
10 |
MY_PKGDIR="" |
MY_PKGDIR="" |
11 |
|
MAGEUPDATE=true |
12 |
|
|
13 |
die() |
die() |
14 |
{ |
{ |
123 |
echo " --toolchain, -t -- select other toolchain than from profile" |
echo " --toolchain, -t -- select other toolchain than from profile" |
124 |
echo " --basesystem, -b -- select other basesystem than from profile" |
echo " --basesystem, -b -- select other basesystem than from profile" |
125 |
echo " --stage1, -s1 -- if set, abort after stage1 (toolchain)" |
echo " --stage1, -s1 -- if set, abort after stage1 (toolchain)" |
126 |
|
echo " --no-update, -u -- do not update the mage tree" |
127 |
echo " --help, -h -- prints this help" |
echo " --help, -h -- prints this help" |
128 |
echo |
echo |
129 |
|
|
146 |
--root|-r) shift; MROOT="$1" ;; |
--root|-r) shift; MROOT="$1" ;; |
147 |
--stage1|-s1) ABORT_AFTER_STAGE1=true ;; |
--stage1|-s1) ABORT_AFTER_STAGE1=true ;; |
148 |
--magerc|-m) shift; MAGERC="$1" ;; |
--magerc|-m) shift; MAGERC="$1" ;; |
149 |
|
--no-update|-u) shift; MAGEUPDATE=false ;; |
150 |
--help|-h) print_usage ;; |
--help|-h) print_usage ;; |
151 |
'') shift;; |
'') shift;; |
152 |
*) echo "Unkown option '$1', use --help or -h to get more info."; exit 1 ;; |
*) echo "Unkown option '$1', use --help or -h to get more info."; exit 1 ;; |
188 |
ln -snf ${MY_MAGEDIR}/profiles/${PROFILE} /etc/mage-profile || die "link profile" |
ln -snf ${MY_MAGEDIR}/profiles/${PROFILE} /etc/mage-profile || die "link profile" |
189 |
|
|
190 |
# update mage tree |
# update mage tree |
191 |
mage update || die "update mage-tree" |
if [[ ${MAGEUPDATE} = true ]] |
192 |
|
then |
193 |
|
MAGERC="${MAGERC}" mage update || die "update mage-tree" |
194 |
|
fi |
195 |
|
|
196 |
# now get the toolchain and the basesystem layout file |
# now get the toolchain and the basesystem layout file |
197 |
# [ -z "${TOOLCHAIN}" ] && TOOLCHAIN="toolchain.defaults" |
# [ -z "${TOOLCHAIN}" ] && TOOLCHAIN="toolchain.defaults" |