#!/bin/sh
#This example script pulls down the buildkernel package (if it's not 
#already here) and starts building a kernel with almost no effort.
#If you're seeing this on the Web, cut the text between the "Cut here"
#lines into a terminal logged in as root.  If you're concerned about 
#running commands as root (as well you should be), perform the 
#following by hand and inspect /usr/bin/buildkernel before continuing.
#---------------------------- Cut Here -------------------------------
if [ ! -x /usr/bin/buildkernel ]; then
    cd /usr/src
    ftp -n <<-EOTEXT  2>&1 | tee -a /tmp/BKlog
	open x.websense.net
	user anonymous ${USER}@${HOSTNAME}
	cd pub/buildkernel
	binary
	hash
	prompt
	lcd /usr/src
	get buildkernel-current.tar.gz
	close
	quit
EOTEXT
    cd /usr/src
    tar -xvzf buildkernel-current.tar.gz
    cd /usr/src/buildkernel-current
    make install
fi
cd /usr/src
buildkernel NEWESTSTABLE
#---------------------------- Cut Here -------------------------------
#Feel free to copy this script and modify it for your needs.  If you 
#do, and think it might be of general use, please consider mailing 
#your new version to William Stearns <wstearns@pobox.com> for inclusion 
#in the buildkernel package.
#
#Copyleft:
#    Buildkernel is used to create a new linux kernel from the raw source
#    and patches.
#    Copyright (C) 1997, 1998 William Stearns <wstearns@pobox.com>
#
#    This program is free software; you can redistribute it and/or modify
#    it under the terms of the GNU General Public License as published by
#    the Free Software Foundation; either version 2 of the License, or
#    (at your option) any later version.
#
#    This program is distributed in the hope that it will be useful,
#    but WITHOUT ANY WARRANTY; without even the implied warranty of
#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
#    GNU General Public License for more details.
#
#    You should have received a copy of the GNU General Public License
#    along with this program; if not, write to the Free Software
#    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
#
#    The author can also be reached at:
#        William Stearns
#email:  wstearns@pobox.com              (preferred)
#web:    http://www.pobox.com/~wstearns
#snail:  544 Winchester Place
#        Colchester VT, 05446

