diff options
-rwxr-xr-x[-rw-r--r--] | script/bootstrap-bash.sh | 4 | ||||
-rwxr-xr-x | script/full-bootstrap-prefix.sh | 71 |
2 files changed, 74 insertions, 1 deletions
diff --git a/script/bootstrap-bash.sh b/script/bootstrap-bash.sh index dc0ac27..c452fc4 100644..100755 --- a/script/bootstrap-bash.sh +++ b/script/bootstrap-bash.sh @@ -17,7 +17,9 @@ cd "$1" mkdir bash-build cd bash-build -ftp "http://distfiles.gentoo.org/distfiles/bash-4.1.tar.gz" +GENTOO_MIRROR=${GENTOO_MIRROR:="http://distfiles.gentoo.org/distfiles"} + +ftp "${GENTOO_MIRROR}/bash-4.1.tar.gz" gzip -d bash-4.1.tar.gz tar -xf bash-4.1.tar cd bash-4.1 diff --git a/script/full-bootstrap-prefix.sh b/script/full-bootstrap-prefix.sh new file mode 100755 index 0000000..bbbf90a --- /dev/null +++ b/script/full-bootstrap-prefix.sh @@ -0,0 +1,71 @@ +#!/usr/bin/env bash + +# Local gentoo mirror, or default to main, eg. +# +export GENTOO_MIRROR="ftp://192.168.100.9/pub/gentoo/distfiles" + +# If there is no GENTOO_MIRROR set, then default to our main distfiles server +# +export GENTOO_MIRROR=${GENTOO_MIRROR:="http://distfiles.gentoo.org/distfiles"} + +# Installation location +# +export EPREFIX="$HOME/gentoo" +export PATH="$EPREFIX/usr/bin:$EPREFIX/bin:$EPREFIX/tmp/usr/bin:$EPREFIX/tmp/bin:$PATH" + +mkdir -p $EPREFIX/tmp + +[ ! -x ${EPREFIX}/tmp/usr/bin/bash ] && ./bootstrap-bash.sh $EPREFIX/tmp +[ ! -d ${EPREFIX}/usr/portage ] && ./bootstrap-prefix.sh $EPREFIX tree + +[ ! -x ${EPREFIX}/tmp/usr/bin/make ] && ./bootstrap-prefix.sh $EPREFIX/tmp make +[ ! -x ${EPREFIX}/tmp/usr/bin/wget ] && ./bootstrap-prefix.sh $EPREFIX/tmp wget +[ ! -x ${EPREFIX}/tmp/usr/bin/sed ] && ./bootstrap-prefix.sh $EPREFIX/tmp sed +[ ! -x ${EPREFIX}/tmp/usr/bin/python2.6 ] && ./bootstrap-prefix.sh $EPREFIX/tmp python +[ ! -x ${EPREFIX}/tmp/usr/bin/cp ] && ./bootstrap-prefix.sh $EPREFIX/tmp coreutils8 +[ ! -x ${EPREFIX}/tmp/usr/bin/find ] && ./bootstrap-prefix.sh $EPREFIX/tmp findutils3 +[ ! -x ${EPREFIX}/tmp/usr/bin/tar ] && ./bootstrap-prefix.sh $EPREFIX/tmp tar22 +[ ! -x ${EPREFIX}/tmp/usr/bin/patch ] && ./bootstrap-prefix.sh $EPREFIX/tmp patch9 +[ ! -x ${EPREFIX}/tmp/usr/bin/gawk ] && ./bootstrap-prefix.sh $EPREFIX/tmp gawk +[ ! -x ${EPREFIX}/tmp/usr/bin/grep ] && ./bootstrap-prefix.sh $EPREFIX/tmp grep +[ ! -x ${EPREFIX}/usr/bin/emerge ] && ./bootstrap-prefix.sh $EPREFIX portage + +hash -r + +# FIXME: the bootstrap scripts use GENTOO_MIRROR but emerge uses GENTOO_MIRRORS +# +export GENTOO_MIRRORS=${GENTOO_MIRROR%/distfiles} + +# FIXME: Sooner or later we'll have to get our profiles straight and won't need this +# +export ACCEPT_KEYWORDS="* ~*" +[ ! -x ${EPREFIX}/bin/sed ] && emerge -1 sed +[ ! -x ${EPREFIX}/bin/bash ] && emerge -1 -O bash +[ ! -x ${EPREFIX}/usr/bin/wget ] && emerge -1 -O wget + +[ ! -x ${EPREFIX}/sbin/runscript.sh ] && emerge -1 -O baselayout-prefix +[ ! -x ${EPREFIX}/usr/bin/m4 ] && emerge -1 -O m4 +[ ! -x ${EPREFIX}/usr/bin/autoconf-* ] && emerge -1 -O autoconf +[ ! -x ${EPREFIX}/usr/bin/autoconf ] && emerge -1 -O autoconf-wrapper +[ ! -x ${EPREFIX}/usr/bin/automake-* ] && emerge -1 -O automake +[ ! -x ${EPREFIX}/usr/bin/automake ] && emerge -1 -O automake-wrapper +[ ! -x ${EPREFIX}/usr/bin/libtool ] && emerge -1 -O libtool +# +# FIXME: this fails with an error that the print function was not found in libtool +#[ ! -x ${EPREFIX}/usr/bin/xz ] && emerge -1 -O xz-utils +# +[ ! -x ${EPREFIX}/usr/bin/flex ] && emerge -1 -O flex +[ ! -x ${EPREFIX}/usr/bin/bison ] && emerge -1 -O bison +[ ! -x ${EPREFIX}/usr/bin/binutils-config ] && emerge -1 -O binutils-config +[ ! -x ${EPREFIX}/usr/bin/gcc-config ] && emerge -1 -O gcc-config + +# +# TODO: We've gotten up to approx code listing 1.7 of the FBSD bootstrap +# http://www.gentoo.org/proj/en/gentoo-alt/prefix/bootstrap-freebsd.xml +# +#$ emerge --oneshot --nodeps binutils +#$ emerge --oneshot --nodeps "=gcc-4.2*" + + + + |