#!/bin/sh
#item   ####description                                      ###on off ###
TMP=/var/log/setup/tmp
if [ ! -d $TMP ]; then
  mkdir -p $TMP
fi
cat /dev/null > $TMP/SeTnewtag
dialog --title "SELECTING PACKAGES FROM SERIES XAP (X APPLICATIONS)" \
       --checklist "Please select the packages you wish to install \
from series XAP. Use the \
UP/DOWN keys to scroll through the list, and the SPACE key to select \
the packages you wish to install. Recommended packages have \
already been selected for you, but you may unselect them if you wish. \
Press ENTER when you are \
done." 21 70 10 \
"netscape" "Netscape Communicator Internet browser" "on" \
"fvwm95" "A Win95-like window manager for X" "on" \
"kde" "KDE: The K Desktop Environment" "on" \
"gs_x11" "Adds X11 driver to Ghostscript" "on" \
"libgr" "Graphics-related libraries and header files" "on" \
"qt_1_44" "Library for C++ GUI development (see license)" "on" \
"seyon" "A complete telecommunications package" "off" \
"gnuplot" "Gnuplot function plotting utility" "off" \
"gimp" "GNU Image Manipulation Program" "on" \
"freefont" "Extra fonts for the GIMP" "on" \
"imagick" "ImageMagick image utilities" "on" \
"xv" "XV GIF/TIFF/JPEG/PostScript Image Viewer" "on" \
"gchess" "GNU chess and xboard" "off" \
"xfm" "xfm, an X windows filemanager" "on" \
"xfileman" "another X filemanager" "on" \
"gv" ".ps/.pdf viewer based on Ghostview" "on" \
"tkdesk" "TkDesk X File Manager" "on" \
"x3270" "x3270 3.0.1.3 - IBM host access tool" "off" \
"xgames" "A collection of X windows games" "on" \
"xfract" "Fractint for X" "on" \
"xpaint" "A color painting/image editing program" "on" \
"xpdf" "Portable Document Format (PDF) viewer" "on" \
"xspread" "An X windows spreadsheet" "off" \
"xxgdb" "xxgdb-1.12" "on" \
"arena" "A graphical browser for the World Wide Web" "off" \
2> $TMP/SeTpkgs
if [ $? = 1 -o $? = 255 ]; then
 rm -f $TMP/SeTpkgs
 > $TMP/SeTnewtag
 for pkg in gchess gv gnuplot gs_x11 gimp freefont imagick \
  kde xpdf seyon xxgdb arena libgr x3270 tkdesk qt_1_44 \
  xfm xpaint fvwm95 xfileman xfract xgames xspread xv netscape ; do
  echo "$pkg: SKP" >> $TMP/SeTnewtag
 done
 exit
fi
cat /dev/null > $TMP/SeTnewtag
for PACKAGE in gchess xfm gv x3270 xgames xspread xxgdb imagick \
kde xpdf arena xfileman gnuplot gs_x11 libgr seyon xv tkdesk \
gimp freefont fvwm95 xfract xpaint netscape qt_1_44 ; 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
