#!/bin/sh
#item   ####description                                      ###on off ###
cat /dev/null > /tmp/SeTnewtag 
dialog --title "jg(Japanese Games) series" \
       --checklist "select packages from jg series" 20 72 14 \
"actx" "Window Sitter Program ActX 0.99.3pl3" "off" \
"emiclock" "Emiclock 2.0.2" "on" \
"fkiss" "Kisekae game for X French-Kiss! 0.28" "off" \
"gcal" "Dentaku invader game gcal 1.0" "off" \
"igusta2" "Puzzle game for X igusta2 1.02" "off" \
"jnethack" "Roll Playing Game JNetHack 1.1.5" "on" \
"lifegame" "Simulation game for X lifegame 1.0" "off" \
"mindfocu" "Window Sitter Program mindfocus 0.86.1" "off" \
"netmaj" "Mahjong games for network netmaj " "on" \
"penta" "Action game for X penta 0.81" "off" \
"poker" "Hitori Poker game poker 1.0" "off" \
"rogue" "Rogue Clone game rogue 1.0" "off" \
"same" "samegame for tty same 1.0" "on" \
"seimei" "seimei handan for emacs seimei 2.0 " "off" \
"shoot" "Shooting game for X shoot 0.94" "off" \
"sxsame" "Samegame for X sxsame 3.02" "off" \
"x777" "action puzzle game x777 0.1" "off" \
"xballoon" "Displaying balloons program xballoon 1.0 " "off" \
"xcapsule" "Puzzle game using capsules xcapsule 1.0 " "off" \
"xflash" "Shooting game for X xflash 1.0" "off" \
"xhakom" "Hakoiri-Musume xhakom 1.2" "off" \
"xjokes" "Joking Program for X xjokes 1.0 " "on" \
"xjump" "Action game for X xjump 2.6" "off" \
"xkobo" "Shooting game for X xkobo 1.11" "off" \
"xmascot" "Mascot program for X xmascot 2.6a" "off" \
"xmd" "Action puzzle game for X xmd 1.28 " "off" \
"xmogura" "Mogura tataki game for X xmogura 1.0" "off" \
"xosmulti" "Window Sitter program xosmulti 1.00" "on" \
"xpoker" "Poker game xpoker 1.0" "off" \
"xpuzzlet" "Action Puzzle game xpuzzletama 1.5b" "off" \
"xrenju" "Renju game for X xrenju 0.4" "on" \
"xrot" "Action game xrot 1.3.2" "off" \
"xshisen" "Mahjong Puzzle game xshisen 1.36" "on" \
"xsoldier" "Shooting game for X xsoldier 0.96" "off" \
"xtokkaet" "Action Puzzle game for X xtokkaetama 1.0a" "off" \
"yamsweep" "Yet Another MineSweeper yamsweeper 1.9" "on" \
2> /tmp/SeTpkgs
if [ $? = 1 -o $? = 255 ]; then 
 rm -f /tmp/SeTpkgs 
 > /tmp/SeTnewtag 
for pkg in actx emiclock fkiss gcal igusta2 jnethack lifegame mindfocu netmaj penta poker rogue same seimei shoot sxsame x777 xballoon xcapsule xflash xhakom xjokes xjump xkobo xmascot xmd xmogura xosmulti xpoker xpuzzlet xrenju xrot xshisen xsoldier xtokkaet yamsweep ; do
  echo "$pkg: SKP" >> /tmp/SeTnewtag 
 done 
 exit 
fi 
cat /dev/null > /tmp/SeTnewtag
for PACKAGE in actx emiclock fkiss gcal igusta2 jnethack lifegame mindfocu netmaj penta poker rogue same seimei shoot sxsame x777 xballoon xcapsule xflash xhakom xjokes xjump xkobo xmascot xmd xmogura xosmulti xpoker xpuzzlet xrenju xrot xshisen xsoldier xtokkaet yamsweep ; 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
