#!/bin/sh
cd /usr/local/src
if [ -d dvb-kernel ] ; then
   echo "dvb-kernel exists"
   exit 1
fi

cvs -d :pserver:anonymous:@linuxtv.org:/cvs/linuxtv login
cvs -d :pserver:anonymous@linuxtv.org:/cvs/linuxtv co dvb-kernel

DT=`date +%y%m%d`
mv dvb-kernel dvb-kernel-$DT

rm DVB
ln -s dvb-kernel-$DT DVB

cd DVB
sh getlinks
make BTTV=1

sed -i build-2.6/insmod.sh -e "s/modprobe crc32.*/modprobe crc32 > \/dev\/null 2>\&1/"

echo "Deleting kernel drivers"
sh /_config/bin/deldvbkrnl.sh

echo "Done !"
#echo "If you use lirc you have to reemerge it ( emerge lircd )"
