From 360261769bf9a0c9b6d33e593a0f5838d1daf380 Mon Sep 17 00:00:00 2001 From: Stefan Reimer Date: Fri, 28 Oct 2011 14:14:56 -0700 Subject: [PATCH] Added actual download to build.sh --- scripts/build.sh | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/scripts/build.sh b/scripts/build.sh index 675bcfa..e9d68f5 100755 --- a/scripts/build.sh +++ b/scripts/build.sh @@ -53,6 +53,19 @@ bootstrap() { STAGE_TARBALL=${GENTOO_MIRROR}/releases/${STAGE_ARCH}/autobuilds/$(curl -s ${LATEST_STAGE_FILE} | grep -v "^#" | head -n 1) PORTAGE_SNAPSHOT="${GENTOO_MIRROR}/snapshots/portage-latest.tar.bz2" + + [ -d ${ROOT_FS} ] || die "${ROOT_FS} does not exists" + [ -w ${ROOT_FS} ] || die "${ROOT_FS} isn't writable" + + cd ${ROOT_FS} + if [ ! -d "usr" ] ; then + wget "${STAGE_TARBALL}" || die "Getting stage file from ${STAGE_TARBALL} failed" + tar jxpf stage3*.bz2 || die "Extracting stage file failed" + fi + if [ ! -d "usr/portage" ] ; then + wget "${PORTAGE_SNAPSHOT}" || die "Getting portage snapshot ${PORTAGE_SNAPSHOT} failed" + tar jxf portage-latest.tar.bz2 -C "${ROOT_FS}/usr" || die "Extracting portage snapshot failed" + fi }