#!/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 KDE (K DESKTOP)" \
       --checklist "Please select the packages you wish to install \
from series KDE.  KDE is a network transparent contemporary desktop \
environment that seeks to fill the need for an easy to use desktop \
for Unix workstations, similar to the desktop environments found under \
MacOS or Windows98/NT.  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. \
If you're planning to run KDE, be careful not to unselect any required \
packages marked with a (*). \
Press ENTER when you are \
done." 21 69 5 \
"kadmin" "KDE system admin utilities" "on" \
"kdebase" "* The K Desktop Enviroment (base package)" "on" \
"kdegames" "games for KDE" "on" \
"kdelibs" "* Libraries for KDE" "on" \
"kdetoys" "A few desktop toys for KDE" "on" \
"kdeutils" "* Utilities for KDE" "on" \
"kgraphic" "Graphic programs for KDE" "on" \
"kmedia" "Multimedia programs for KDE" "on" \
"knetwork" "Networking programs for KDE" "on" \
"korganiz" "KDE personal organizer" "on" \
"ksupport" "* Support files for KDE" "on" \
"qt_1_45" "* Library for C++ GUI development" "on" \
2> $TMP/SeTpkgs
if [ $? = 1 -o $? = 255 ]; then
 rm -f $TMP/SeTpkgs
 > $TMP/SeTnewtag
 for pkg in kadmin kdebase kdegames kdelibs kdetoys kdeutils kgraphic kmedia \
  knetwork korganiz ksupport qt_1_45 ; do
  echo "$pkg: SKP" >> $TMP/SeTnewtag
 done
 exit
fi
cat /dev/null > $TMP/SeTnewtag
for PACKAGE in kadmin kdebase kdegames kdelibs kdetoys kdeutils kgraphic \
 kmedia knetwork korganiz ksupport qt_1_45 ; 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
