--- trunk/bootstrap/scripts/mage-bootstrap.sh 2008/03/20 11:55:44 683 +++ trunk/bootstrap/mage-bootstrap.sh.in 2011/08/04 13:19:28 1487 @@ -1,5 +1,5 @@ #!/bin/bash -# $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 $ TOOLCHAIN="" BASESYSTEM="" @@ -8,6 +8,8 @@ ABORT_AFTER_STAGE1=false MY_MAGEDIR="" MY_PKGDIR="" +MAGEUPDATE=true +MAGEUPDATETARBALL=false die() { @@ -115,14 +117,16 @@ echo "Usage: $(basename $0) --opt arg ..." echo echo "Options:" - echo " --profile, -p -- select a profile (needed)" - echo " --root, -r -- location to new root (needed)" - echo " --magerc, -m -- location of mage.rc (needed)" + echo " --profile, -p -- select a profile (needed)" + echo " --root, -r -- location to new root (needed)" + echo " --magerc, -m -- location of mage.rc (needed)" echo - echo " --toolchain, -t -- select other toolchain than from profile" - echo " --basesystem, -b -- select other basesystem than from profile" - echo " --stage1, -s1 -- if set, abort after stage1 (toolchain)" - echo " --help, -h -- prints this help" + echo " --toolchain, -t -- select other toolchain than from profile" + echo " --basesystem, -b -- select other basesystem than from profile" + echo " --stage1, -s1 -- if set, abort after stage1 (toolchain)" + echo " --update-tarball, -ut -- update via tarball not rsync" + echo " --no-update, -u -- do not update the mage tree" + echo " --help, -h -- prints this help" echo exit 1 @@ -144,6 +148,8 @@ --root|-r) shift; MROOT="$1" ;; --stage1|-s1) ABORT_AFTER_STAGE1=true ;; --magerc|-m) shift; MAGERC="$1" ;; + --update-tarball|-ut) MAGEUPDATETARBALL=true ;; + --no-update|-u) MAGEUPDATE=false ;; --help|-h) print_usage ;; '') shift;; *) echo "Unkown option '$1', use --help or -h to get more info."; exit 1 ;; @@ -185,7 +191,15 @@ ln -snf ${MY_MAGEDIR}/profiles/${PROFILE} /etc/mage-profile || die "link profile" # update mage tree -mage update || die "update mage-tree" +if [[ ${MAGEUPDATE} = true ]] +then + if [[ ${MAGEUPDATETARBALL} = true ]] + then + MAGERC="${MAGERC}" mage update-tarball || die "update mage-tree" + else + MAGERC="${MAGERC}" mage update || die "update mage-tree" + fi +fi # now get the toolchain and the basesystem layout file # [ -z "${TOOLCHAIN}" ] && TOOLCHAIN="toolchain.defaults"