#!/bin/sh
dialog \
--title "Select chipset class" \
--menu "Please choose the appropriate chipset for \nyour card. (current: $1)" \
21 50 10 \
\
"ATI"   "ATI Technology chipsets" \
"S3"    "S3 Incorporated chipsets" \
"VGA"   "generic VGA" \
\
2> /tmp/.chipclass 

CHIP_CLASS=$1
CHIP_TYPE=$2

NEW_CHIP_CLASS=`cat /tmp/.chipclass`

if [ "$NEW_CHIP_CLASS" != "" ]; then
  chipset/$NEW_CHIP_CLASS/.configure $2
  NEW_CHIP_TYPE=`cat /tmp/.chiptype`
  if [ "$NEW_CHIP_TYPE" != "" ]; then
    CHIP_CLASS=$NEW_CHIP_CLASS
    CHIP_TYPE=$NEW_CHIP_TYPE
  fi
fi

echo $CHIP_CLASS>/tmp/.chipclass
echo $CHIP_TYPE>/tmp/.chiptype
