#!/bin/sh
#item   ####description                                      ###on off ###
cat /dev/null > /tmp/SeTnewtag 
dialog --title "AP(Application) シリーズの選択" \
       --checklist "APシリーズの中からインストールしたいパッケージを \
選んでください。カーソルの上下キーで \
動かし、選択は SPACE キーです。 \
選択が終われば ENTER を押してください。" 24 72 16 \
"ash" "Kenneth Almquist 作の ash シェル" "off" \
"bc" "Gnu bc 1.04 - 任意精度演算言語" "on" \
"diff" "GNU diffutils-2.7" "on" \
"fdclone" "FD-clone 1.03r" "on" \
"gs705" "日本語対応 Ghostscript 7.05" "on" \
"gv" "Ghostscript Viewer" "on" \
"ispell" "ispell-3.1.20" "on" \
"jgroff" "日本語版 Groff パッケージ" "on" \
"manpgs" "Man-pages 1.21 (オンラインドキュメント集)" "on" \
"mt_st" "mt_st-0.4 - 磁気テープ操作コマンド" "on" \
"netpbm" "画像フォーマット変換ツール" "on" \
"quota" "quota 1.55" "on" \
"texinfo" "GNU texinfo-3.9" "on" \
"vfjfm" "ASCII pTeX 用 JFM フォント" "on" \
"vflib" "ベクトルフォントライブラリ" "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
