#!/bin/sh
#item   ####description                                      ###on off ###
cat /dev/null > /tmp/SeTnewtag 
dialog --title "jg(Japanese Games) シリーズの選択" \
       --checklist "jgシリーズの中からインストールしたいパッケージを \
選んでください。カーソルの上下キーで \
動かし、選択は SPACE キーです。 \
選択が終われば ENTER を押してください。" 24 72 16 \
"actx" "Window Sitter プログラム ActX 0.99.3pl3" "off" \
"emiclock" "美少女コスプレ時計 Emiclock 2.0.2" "on" \
"fkiss" "Xウィンドウ用着せ替えゲーム French-Kiss! 0.28" "off" \
"gcal" "電たくインベーダーゲーム gcal 1.0" "off" \
"igusta2" "X Window System 上で動くパズルゲーム igusta2 1.02" "off" \
"jnethack" "ダンジョン探険RPG JNetHack 1.1.5" "on" \
"lifegame" "X Window System 上で動くシミュレーション lifegame 1.0" "off" \
"mindfocu" "Window Sitter プログラム mindfocus 0.86.1" "off" \
"netmaj" "Network 対応麻雀ゲーム netmaj " "on" \
"penta" "アクションゲーム penta 0.81" "off" \
"poker" "" "off" \
"rogue" "メッセージ分離型ローグクローンII rogue 1.0" "off" \
"same" "" "on" \
"seimei" "emacs用姓名判断 seimei 2.0 " "off" \
"shoot" "シューティングゲーム shoot 0.94" "off" \
"sxsame" "X Window 用「さめがめ」 sxsame 3.02" "off" \
"x777" "落下型パズルゲーム x777 0.1" "off" \
"xballoon" "風船表示プログラム xballoon 1.0 " "off" \
"xcapsule" "カプセル落下パズルゲーム xcapsule 1.0 " "off" \
"xflash" "縦スクロールシューティングゲーム xflash 1.0" "off" \
"xhakom" "はこ入りむすめ xhakom 1.2" "off" \
"xjokes" "X ウィンドウ用ジョークプログラム xjokes 1.0 " "on" \
"xjump" "アクションゲーム xjump 2.6" "off" \
"xkobo" "シューティングゲーム xkobo 1.11" "off" \
"xmascot" "X ウィンドウ用マスコット xmascot 2.6a" "off" \
"xmd" "対戦型落ち物ゲーム xmd 1.28 " "off" \
"xmogura" "もぐらたたき xmogura 1.0" "off" \
"xosmulti" "Window Sitter プログラム xosmulti 1.00" "on" \
"xpoker" "ポーカーゲーム xpoker 1.0" "off" \
"xpuzzlet" "X ウィンドウ用落ち物系パズルゲーム xpuzzletama 1.5b" "off" \
"xrenju" "X ウィンドウ用連珠 xrenju 0.4" "on" \
"xrot" "アクションゲーム xrot 1.3.2" "off" \
"xshisen" "麻雀牌パズル xshisen 1.36" "on" \
"xsoldier" "縦スクロールシューティング xsoldier 0.96" "off" \
"xtokkaet" "落ちものパズルゲーム xtokkaetama 1.0a" "off" \
"yamsweep" "もう一つのマインスイーパー 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
