#!/bin/sh
#item   ####description                                      ###on off ###
cat /dev/null > /tmp/SeTnewtag 
dialog --title "y(Old Games) series" \
       --checklist "select packages from y series" 20 72 14 \
"bsdgames" "text oriented games from BSD " "on" \
2> /tmp/SeTpkgs
if [ $? = 1 -o $? = 255 ]; then 
 rm -f /tmp/SeTpkgs 
 > /tmp/SeTnewtag 
for pkg in bsdgames ; do
  echo "$pkg: SKP" >> /tmp/SeTnewtag 
 done 
 exit 
fi 
cat /dev/null > /tmp/SeTnewtag
for PACKAGE in bsdgames ; do
  if grep \"$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
