#!/bin/sh

# Decompress tar
tar xzvf Fedora-C2-i386.tgz
cd Fedora-C2-i386

# Backup xorg.conf
cp /etc/X11/xorg.conf /etc/X11/xorg.conf.old

# Copy binaries 
cp ./LinearAp /usr/local/bin/
cp ./FreeDraw /usr/local/bin/
cp ./xfhiddrv_drv.o /usr/X11R6/lib/modules/input/

# Modify xorg.conf
cp /etc/X11/xorg.conf ./xorg.conf
./chgxorg
cp ./xorg.conf /etc/X11/xorg.conf

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

