9 |
MY_MAGEDIR="" |
MY_MAGEDIR="" |
10 |
MY_PKGDIR="" |
MY_PKGDIR="" |
11 |
MAGEUPDATE=true |
MAGEUPDATE=true |
12 |
|
MAGEUPDATETARBALL=false |
13 |
|
|
14 |
die() |
die() |
15 |
{ |
{ |
117 |
echo "Usage: $(basename $0) --opt arg ..." |
echo "Usage: $(basename $0) --opt arg ..." |
118 |
echo |
echo |
119 |
echo "Options:" |
echo "Options:" |
120 |
echo " --profile, -p -- select a profile (needed)" |
echo " --profile, -p -- select a profile (needed)" |
121 |
echo " --root, -r -- location to new root (needed)" |
echo " --root, -r -- location to new root (needed)" |
122 |
echo " --magerc, -m -- location of mage.rc (needed)" |
echo " --magerc, -m -- location of mage.rc (needed)" |
123 |
echo |
echo |
124 |
echo " --toolchain, -t -- select other toolchain than from profile" |
echo " --toolchain, -t -- select other toolchain than from profile" |
125 |
echo " --basesystem, -b -- select other basesystem than from profile" |
echo " --basesystem, -b -- select other basesystem than from profile" |
126 |
echo " --stage1, -s1 -- if set, abort after stage1 (toolchain)" |
echo " --stage1, -s1 -- if set, abort after stage1 (toolchain)" |
127 |
echo " --no-update, -u -- do not update the mage tree" |
echo " --update-tarball, -ut -- update via tarball not rsync" |
128 |
echo " --help, -h -- prints this help" |
echo " --no-update, -u -- do not update the mage tree" |
129 |
|
echo " --help, -h -- prints this help" |
130 |
echo |
echo |
131 |
|
|
132 |
exit 1 |
exit 1 |
148 |
--root|-r) shift; MROOT="$1" ;; |
--root|-r) shift; MROOT="$1" ;; |
149 |
--stage1|-s1) ABORT_AFTER_STAGE1=true ;; |
--stage1|-s1) ABORT_AFTER_STAGE1=true ;; |
150 |
--magerc|-m) shift; MAGERC="$1" ;; |
--magerc|-m) shift; MAGERC="$1" ;; |
151 |
--no-update|-u) shift; MAGEUPDATE=false ;; |
--update-tarball|-ut) MAGEUPDATETARBALL=true ;; |
152 |
|
--no-update|-u) MAGEUPDATE=false ;; |
153 |
--help|-h) print_usage ;; |
--help|-h) print_usage ;; |
154 |
'') shift;; |
'') shift;; |
155 |
*) 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 ;; |
193 |
# update mage tree |
# update mage tree |
194 |
if [[ ${MAGEUPDATE} = true ]] |
if [[ ${MAGEUPDATE} = true ]] |
195 |
then |
then |
196 |
MAGERC="${MAGERC}" mage update || die "update mage-tree" |
if [[ ${MAGEUPDATETARBALL} = true ]] |
197 |
|
then |
198 |
|
MAGERC="${MAGERC}" mage update-tarball || die "update mage-tree" |
199 |
|
else |
200 |
|
MAGERC="${MAGERC}" mage update || die "update mage-tree" |
201 |
|
fi |
202 |
fi |
fi |
203 |
|
|
204 |
# now get the toolchain and the basesystem layout file |
# now get the toolchain and the basesystem layout file |