#!/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 D (PROGRAM DEVELOPMENT)" \
       --checklist "Please confirm the packages you wish to install \
from series D.  Use the UP/DOWN keys to scroll through the list, and \
the SPACE key to deselect any items you don't want to install.  \
Press ENTER when you are \
done." 22 72 12 \
"libtool" "GNU libtool library support script" "on" \
"m4" "GNU m4 macro processor" "on" \
"make" "GNU make" "on" \
"perl" "Larry Wall's systems language" "on" \
"perl-modules" "perl modules" "on" \
"linux-pam" "Pluggable Authentication Modules for Linux" "on" \
"pkg-config" "A tool for managing library information" "on" \
"python" "An interpreted object-oriented language" "on" \
2> $TMP/SeTpkgs
if [ $? = 1 -o $? = 255 ]; then
 rm -f $TMP/SeTpkgs
 > $TMP/SeTnewtag
 for pkg in \
libtool m4 make perl perl-modules linux-pam pkg-config python \
  ; do
  echo "$pkg: SKP" >> $TMP/SeTnewtag
 done
 exit
fi
cat /dev/null > $TMP/SeTnewtag
for PACKAGE in \
libtool m4 make perl perl-modules linux-pam pkg-config python \
 ; 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
