#!/bin/sh

# Decompress tar
tar xzvf ubuntu-10.04-0.4.tgz
cd ubuntu-10.04-0.4

# Backup xorg.conf
cp /etc/X11/xorg.conf /etc/X11/xorg.conf.old
cp -f /usr/lib/X11/xorg.conf.d/05-evdev.conf /usr/lib/X11/xorg.conf.d/05-evdev.conf.old

# Copy binaries 
cp ./LinearAp /usr/local/bin/
cp ./*.so /usr/lib/xorg/modules/input/

# Modify xorg.conf
Xorg -configure :1
cp ~/xorg.conf.new ./xorg.conf
./chgxorg
cp ./xorg.conf /etc/X11/xorg.conf
cp -f ./05-evdev.conf  /usr/lib/X11/xorg.conf.d/

echo "Setup completed, please restart system to enable touch panel."

