#!/bin/sh
# PROVIDE: world-install
# REQUIRE: kernel-build
. ../config
. lib/lib.sh

if [ "$1" = "install" -o "$1" = "all" ]; then
stage_init
stage_check

BASEDIR="${CURRDIR}/base"
SOURCEDIR="${CURRDIR}/../${SRCDIR}"
export __MAKE_CONF=${BASEDIR}/${MAKECONFINSTALL}
export MAKEOBJDIRPREFIX="${CURRDIR}/../${FRENZY_BUILD}"


cd ${SOURCEDIR}/etc
make distrib-dirs DESTDIR=${CURRDIR}/../${FRENZY_FS}
make distribution DESTDIR=${CURRDIR}/../${FRENZY_FS}

cd ${SOURCEDIR}
make installworld DESTDIR=${CURRDIR}/../${FRENZY_FS}

stage_done

fi
