#!/bin/sh
#item   ####description                                      ###on off ###
rm -f /tmp/SeTnewtag # empty the return file
dialog --title "SELECTING PACKAGES FOR SERIES C (Chinese packages)" \
       --checklist "Please select the packages you wish to install \
from series C. 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." 22 70 9 \
"cconvert" "Chinese converters for different formats" "off" \
"chdrv" "A Chinese Terminal Simulator works without X Window." "off" \
"cjoe" "A Chinese text editor" "off" \
"cless" "Chinese less - less is opposite of more" "off" \
"cnprint" "A utility to print Chinese/Japanese text" "off" \
"cnptfont" "GB and JIS fonts for Cnprint" "off" \
"ctin" "Chinese Netnews reader" "off" \
"cxterm" "Chinese terminal emulator for X Window System X11R5" "off" \
"cxtermgb" "GB font and dictionaries for CXterm" "off" \
"cytalk" "Chinese ytalk - A multi-user chat program" "off" \
"hztty" "Make cxterm understand different encoding" "off" \
"hzview" "Display Chinese GB or BIG5 on a dumb terminal" "off" \
"lunar" "A calendar conversion utility" "off" \
"pmc" "Modified Poor Man's Chinese TeX/LaTeX" "off" \
"pmfjfs" "A set of Poor Man's Chinese TeX/LaTeX GB font" "off" \
"pmfkcm" "A set of Poor Man's Chinese TeX/LaTeX BIG5 font" "off" \
2> /tmp/SeTpkgs
if [ $? = 1 -o $? = 255 ]; then
 rm -f /tmp/SeTpkgs
 exit
fi
cat /dev/null > /tmp/SeTnewtag
for PACKAGE in cconvert chdrv cjoe cless cnprint cnptfont ctin cxterm \
cxtermgb cytalk hztty hzview lunar pmc pmfjfs pmfkcm ; 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
