#!/bin/sh -x
bootcd=$(pwd)
cd linux
ver=$(awk -F\" '/UTS_RELEASE/{print $2;quit}' include/linux/version.h)
make oldconfig bzImage modules modules_install INSTALL_MOD_PATH=$BOOTCD/$ROOTDIR
install -m 644 System.map $BOOTCD/$ROOTDIR/boot/System.map-$ver
cd $bootcd/translucency
make clean all KERNELDIR=$BOOTCD/linux
install -m 644 translucency.o $BOOTCD/$ROOTDIR/lib/modules/$ver/kernel/fs/
$bootcd/bin/installheaders $BOOTCD/$ROOTDIR/usr/src/linux-$ver
cd $bootcd/cloop
make clean all KERNEL_DIR=$BOOTCD/linux
mkdir -p $BOOTCD/initrdtemplate/lib/modules/$ver/
install -m 644 cloop.o $BOOTCD/initrdtemplate/lib/modules/$ver/
cd $bootcd
install -m 644 linux/arch/i386/boot/bzImage $DESTDIR/isolinux/linux24.20n
depmod -a -b $ROOTDIR -F $ROOTDIR/boot/System.map-$ver $ver
