#!/bin/sh
#
# setup
#
# This scripts installs the S3 Trio64(V+ and V2[GX/DX]) graphics driver
# for BeOS Intel R4.
#
# Tom Sabourin, sabourins@email.msn.com, tsabou@atl.com  5/26/1999
#

version=$(strings trio64v2p | egrep S3TRIO64V2P | sed 's/.*S3TRIO64V2P//')
curdir=$(dirname $0)

answer=$(alert "Install the S3 Trio64(V+ and V2[GX/DX]) graphics driver Version $version now?" "No" "Yes")
if [ $answer == "No" ]; then
	exit
fi

copyattr -d $curdir/trio64v2p /boot/home/config/add-ons/kernel/drivers/bin
ln -s ../../bin/trio64v2p /boot/home/config/add-ons/kernel/drivers/dev/graphics/trio64v2p
copyattr -d $curdir/trio64v2p.accelerant /boot/home/config/add-ons/accelerants

answer=$(alert "The driver was installed on your system.

Do you want your system restarted now?" "No" "Yes")

if [ $answer == "No" ]; then
	exit
fi

shutdown -r

