#!/bin/sh
# $Id: 3.installworld.sh,v 1.8 2004/07/09 10:41:08 drizzt Exp $                     

set -e -u

. ./config.sh

echo "Copying /etc files..."
sleep 1
cd /usr/src/etc && make distrib-dirs DESTDIR=$FREESBIEBASEDIR
cd /usr/src/etc && make distribution DESTDIR=$FREESBIEBASEDIR

export __MAKE_CONF=$LOCALDIR/files/make.conf # Redefine make.conf path

echo "Installing world..."
sleep 1
cd /usr/src/ && make installworld DESTDIR=$FREESBIEBASEDIR

if [ "$RELEASE" != "5" ];
then
    echo "Building new sysinstall..."
    sleep 1
    cd /usr/src/release/sysinstall
    make clean
    make 
    make install

    tar -cf - -C /stand . | tar xpf - -C $FREESBIEBASEDIR/stand
fi
