#!/bin/sh
#item   ####description                                      ###on off ###
cat /dev/null > /tmp/SeTnewtag 
dialog --title "AP(Application) series" \
       --checklist "select packages from AP series" 20 72 14 \
"ash" "ash shell written by Kenneth Almquist" "off" \
"bc" "Gnu bc 1.04 - arbitrary calculator language" "on" \
"diff" "GNU diffutils-2.7" "on" \
"fdclone" "FD-clone 1.03j" "on" \
"gs705" "Ghostsciprt 7.05 with Japanese extensions" "on" \
"gv" "Ghostscript Viewer" "on" \
"ispell" "ispell-3.1.20" "on" \
"jgroff" "Groff packages with Japanese extensions" "on" \
"manpgs" "Man-pages 1.21 (on line man pages)" "on" \
"mt_st" "mt_st-0.4 - tool for magnetic tape" "on" \
"netpbm" "netpbm - graphic formats interchage commands" "on" \
"quota" "quota 1.55" "on" \
"texinfo" "GNU texinfo-3.9" "on" \
"vfjfm" "JFM fonts for ASCII pTeX" "on" \
"vflib" "VFlib - vector font library " "on" \
2> /tmp/SeTpkgs
if [ $? = 1 -o $? = 255 ]; then 
 rm -f /tmp/SeTpkgs 
 > /tmp/SeTnewtag 
for pkg in ash bc diff fdclone gs705 gv ispell jgroff manpgs mt_st netpbm quota texinfo vfjfm vflib ; do
  echo "$pkg: SKP" >> /tmp/SeTnewtag 
 done 
 exit 
fi 
cat /dev/null > /tmp/SeTnewtag
for PACKAGE in ash bc diff fdclone gs705 gv ispell jgroff manpgs mt_st netpbm quota texinfo vfjfm vflib ; 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
