#!/bin/sh
#item   ####description                                      ###on off ###
cat /dev/null > /tmp/SeTnewtag 
dialog --title "jml(Emacs) series" \
       --checklist "select packages from jml series. \
select packages with cursor up/down key,  \
and push select to mark. \
Finish selection push Enter to proceed." 24 72 16 \
"apel" "Apel 10.3 for Emacs 21" "on" \
"eggremix" "Egg remix for Tamago V4" "on" \
"emacs" "Emacs 21.1" "on" \
"libungf4" "Ungif Library version4" "on" \
"mew" "MUA for Emacs Mew 2.1" "on" \
"skk" "Japanese input method SKK " "on" \
"skkexdic" "extra dictionaries for SKK" "on" \
"tamago" "Tamago V4 for Wnn server" "on" \
"yatex" "YaTeX is  Yet Another Tex mode for Emacs" "on" \
2> /tmp/SeTpkgs
if [ $? = 1 -o $? = 255 ]; then 
 rm -f /tmp/SeTpkgs 
 > /tmp/SeTnewtag 
for pkg in apel eggremix emacs mew skk skkexdic tamago yatex libungf4 ; do
  echo "$pkg: SKP" >> /tmp/SeTnewtag 
 done 
 exit 
fi 
cat /dev/null > /tmp/SeTnewtag
for pkg in apel eggremix emacs mew skk skkexdic tamago yatex libungf4 ; 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
