#!/bin/bash
#090221 - Daniel Holm's MSI DigiVox mini II V.3.0 module-script V3
apt-get -y install mercurial zenity linux-headers-$(uname -r) build-essential
echo Downloading Firmware file.
cd /lib/firmware/`uname -r`
wget http://www.otit.fi/~crope/v4l-dvb/af9015/af9015_firmware_cutter/firmware_files/4.95.0/dvb-usb-af9015.fw
cd
echo Download, compile and install v4l-dvb.
hg clone http://linuxtv.org/hg/v4l-dvb
cd v4l-dvb
make
make install
cd ..
rm -R v4l-dvb
echo v4l-dvb is now installed.
echo Download, compile and install af9015 module.
hg clone http://linuxtv.org/hg/~anttip/af9015/
cd af9015
make
make install
cd ..
rm -R af9015
echo af9015 is now installed.
echo Setting up use of remote controll
echo -e "options dvb_usb_af9015   remote=2" | tee -a /etc/modprobe.d/dvb_usb_af9015.modprobe
echo -e "options usbhid quirks=0x15a4:0x9016:0x4" tee -a /etc/modprobe.d/usbhid
echo Loading needed modules and adding them to start-up.
modprobe dvb-usb-af9015
rmmod usbhid; modprobe usbhid
echo -e "dvb-usb-af9015" | tee -a /etc/modules
zenity --info --text "Everything is done, you may now insert your DVB-T card."
echo Everything is done, you may now insert your DVB-T card.
exit 0
