#!/bin/sh

if [ -z "$1" ] ; then
    echo "usage: freebsd-kernel.sh <configuration name>"
    exit 1
fi

if [ ! -f /usr/src/sys/`uname -m`/conf/$1 ] ; then
    echo "could not find" /usr/src/sys/`uname -m`/conf/$1
    exit 1
fi

cd /usr/src || exit 1
make buildkernel KERNCONF=$1 || exit 1
make installkernel KERNCONF=$1

