#!/bin/sh
wget -NP /etc/apt http://kanotix.com/files/dragonfire/sources.list
printf 'deb http://ftp.de.debian.org/debian experimental main contrib non-free\ndeb-src http://ftp.de.debian.org/debian experimental main contrib non-free\n' > /etc/apt/sources.list.d/experimental.list
apt-get update
apt-get --yes install -t experimental fglrx-driver fglrx-modules-dkms xvba-va-driver fglrx-atieventsd fglrx-control
test `uname -m`! = x86_64! && apt-get --yes install -t experimental libgl1-fglrx-glx:i386
update-initramfs -ut
rm -vf /etc/X11/xorg.conf*
aticonfig --initial --nobackup
if [ ! -e /etc/X11/xorg.conf ]; then
 echo 'Warning: aticonfig did not create /etc/X11/'$X_CONF' ("unsupported" card by driver), writing basic one!' >&2
 printf 'Section "Device"\n    Identifier     "Device0"\n    Driver         "fglrx"\nEndSection\n' > /etc/X11/xorg.conf
fi
