#!/bin/sh
#item   ####description                                      ###on off ###
rm -f /tmp/SeTnewtag # empty the return file
dialog --title "SELECTING PACKAGES FOR 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 \
"gs_x11" "Adds X11 driver to Ghostscript" "on" \
"libgr13" "Shared libraries with GIF, TIFF, JPEG support" "on" \
"seyon" "A complete telecommunications package" "on" \
"vgaset" "Helps configure your monitor for X more easily" "on" \
"workman" "Workman CD music player" "off" \
"xfileman" "A filemanager" "on" \
"xv300" "XV 3.00 GIF/TIFF/JPEG/PostScript Image Viewer" "on" \
"xgrabsc" "A screen capture program" "on" \
"gchess" "GNU chess (v. 4.00 patch level 62)" "on" \
"xfm12" "xfm 1.2, an X windows filemanager" "off" \
"ghstview" "Ghostview 1.5" "on" \
"x3270" "x3270 3.0.1.3 - IBM host access tool" "off" \
"xgames" "A collection of X windows games" "off" \
"xspread" "An X windows spreadsheet" "off" \
"xxgdb" "xxgdb-1.08" "off" \
2> /tmp/SeTpkgs
if [ $? = 1 -o $? = 255 ]; then
 rm -f /tmp/SeTpkgs
 exit
fi
cat /dev/null > /tmp/SeTnewtag
for PACKAGE in gchess xfm12 ghstview x3270 xgames xspread xxgdb \
gs_x11 libgr13 seyon vgaset workman xfileman xv300 xgrabsc ; 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