#!/bin/sh
add() {
  for package in $* ; do
    echo "$package: ADD" >> /tmp/SeTnewtag
  done
}
skip() {
  for package in $* ; do
    echo "$package: SKP" >> /tmp/SeTnewtag
  done
}
#item   ####description                                      ###on off ###
cat /dev/null > /tmp/SeTnewtag
dialog --title "SELECTING X SERVER FROM SERIES X (XFree86 3.3)" \
       --checklist "Please select the X server you wish to install \
from series X. \
In most cases, you'll only want to \
install the X server needed for your video card, but if you plan to \
export your /usr partition via NFS, you may need other servers as well. \
Press ENTER when you are \
done." 22 70 11 \
"x338514" "X server for cards using IBM8514 chips" "off" \
"x33agx" "X server for cards using AGX chips" "off" \
"x33ma8" "X server for cards using Mach8 chips" "off" \
"x33ma32" "X server for cards using Mach32 chips" "off" \
"x33ma64" "X server for cards using Mach64 chips" "off" \
"x33mono" "A Monochrome X server" "off" \
"x33p9k" "X server for cards using P9000 chips" "off" \
"x33s3" "X server for cards using S3 chips" "off" \
"x33s3v" "X server for cards using S3 ViRGE chips" "off" \
"x33svga" "X server for SuperVGA cards" "off" \
"x33vg16" "A 16-color generic X server" "off" \
"x33w32" "X server for cards using the ET4000/W32 chipset" "off" \
"x33i128" "X server for the #9 Imagine 128" "off" \
2> /tmp/SeTpkgs
if [ $? = 1 -o $? = 255 ]; then
 rm -f /tmp/SeTpkgs
 > /tmp/SeTnewtag
 for pkg in fvwm fvwmicns oldlibs5 oldlibs6 x338514 x33agx x33bin x33cfg \
  x33doc x33f100 x33fcyr x33fnon1 x33fnon2 x33fnts x33fscl x33fsrv x33html \
  x33i128 x33jdoc x33lib x33ma32 x33ma64 x33ma8 x33man x33mono x33nest \
  x33p9k x33prog x33prt x33ps x33s3 x33s3v x33setup x33svga x33vfb x33vg16 \
  x33w32 xlock xpm ; do
  echo "$pkg: SKP" >> /tmp/SeTnewtag
 done
 exit
fi
cat /dev/null > /tmp/SeTnewtag
for PACKAGE in x338514 x33agx x33ma8 x33ma32 x33ma64 x33mono x33p9k \
x33s3 x33svga x33vg16 x33w32 x33i128 x33s3v ; do
 if fgrep \"$PACKAGE\" /tmp/SeTpkgs 1> /dev/null 2> /dev/null ; then
  echo "$PACKAGE: ADD" >> /tmp/SeTnewtag
 else
  echo "$PACKAGE: SKP" >> /tmp/SeTnewtag
 fi
done
dialog --title "SELECTING PACKAGES FROM SERIES X (XFree86 3.3)" \
       --checklist "Please select the packages you wish to install \
from series X. \
Recommended packages have already been selected. \
Press ENTER when you are \
done." 21 70 12 \
"fvwm" "FVWM window manager" "on" \
"x33doc" "Documentation for XFree86 3.3" "off" \
"x33jdoc" "Japanese documentation for X" "off" \
"x33html" "HTML format docs for XFree86 3.3" "off" \
"x33ps" "PostScript format docs for XFree86 3.3" "off" \
"fvwmicns" "Color icons from xpm3icons.tar.Z" "off" \
"x33setup" "TCL/dialog setup tool for X" "off" \
"x33man" "Man pages for XFree86 3.3" "on" \
"x33cfg" "xdm and other X configuration files" "on" \
"x33bin" "Basic client binaries required for X" "on" \
"x33prog" "Header files for X programming" "on" \
"x33lib" "Libraries and bitmaps for X" "on" \
"oldlibs5" "XFree86 2.1.1 shared libraries" "on" \
"oldlibs6" "XFree86 3.1.1 shared libraries" "on" \
"xpm" "The Xpm shared library" "on" \
"x33fnts" "Basic fonts needed to run X" "on" \
"x33f100" "100 dpi fonts" "off" \
"x33fnon1" "Big fonts, part one" "off" \
"x33fnon2" "Big fonts, part two" "off" \
"x33fcyr" "Cyrillic fonts" "off" \
"x33fscl" "Scalable Speedo/Type1 fonts" "off" \
"x33fsrv" "X font server" "off" \
"x33nest" "Experimental nested X server" "off" \
"x33vfb" "Virtual framebuffer X server" "off" \
"x33prt" "Print-only X server" "off" \
"xlock" "A screensaver/locker for X" "on" \
2> /tmp/SeTpkgs
if [ $? = 1 -o $? = 255 ]; then
 rm -f /tmp/SeTpkgs
 exit
fi
for PACKAGE in fvwm fvwmicns oldlibs5 oldlibs6 x33bin x33cfg \
 x33doc x33f100 x33fcyr x33fnon1 x33fnon2 x33fnts x33fscl x33fsrv x33html \
 x33jdoc x33lib x33man x33nest x33prog x33prt x33ps x33setup x33vfb \
 xlock xpm ; do
 if fgrep \"$PACKAGE\" /tmp/SeTpkgs 1> /dev/null 2> /dev/null ; then
  echo "$PACKAGE: ADD" >> /tmp/SeTnewtag
 else
  echo "$PACKAGE: SKP" >> /tmp/SeTnewtag
 fi
done
rm -f /tmp/SeTpkgs
