#!/bin/sh
cat /dev/null > /tmp/SeTnewtag
dialog --title "minimum(Qbilinux Minimum System)シリーズの選択" \
  --checklist "minimum シリーズの中からインストールしたいパッケージを \
選んでください．カーソルの上下キーで \
対象を選択し，space キーでマーク(X)します． \
Enter キーでインストールを開始します．" 24 72 15 \
"Python" "Python" "on" \
"Python2" "オブジェクト指向スクリプト言語 Python2" "on" \
"alsa" "ALSA ライブラリ/ツール" "on" \
"aspell" "進化した高速なスペルチェッカー" "off" \
"autofs" "自動マウント制御用デーモン" "on" \
"bc" "Gnu bc - 任意精度演算言語" "off" \
"berkeley_db" "バークレーDBシステム" "on" \
"brotli" "brotli" "on" \
"bsd_games" "BSD 由来のテキスト版ゲーム集" "on" \
"bvi" "バイナリファイルエディタ" "on" \
"cpio" "CPIO形式アーカイバ" "on" \
"cpufreqd" "CPU周波数管理デーモン" "on" \
"cpufrequtils" "CPU周波数操作ツール" "on" \
"cryptsetup" "暗号化ブロックデバイスの設定" "on" \
"devel" "C/C++ 言語用開発環境" "off" \
"elogind" "elogind" "on" \
"emacs_bin" "Emacs用ツール" "on" \
"emacs_lib" "Emacs Lispパッケージ" "on" \
"emacs_mini" "emacs without X" "on" \
"fortune_mod" "箴言ツール fortune" "on" \
"fprintd" "fprintd" "on" \
"gc" "Boehm GC" "off" \
"gdbm" "GNUデータベースツール" "on" \
"get_pkginfo" "Qbilinux 用パッケージ更新ツール" "on" \
"gnupg_tls" "GnuPG と GnuTLS" "on" \
"gpm" "汎用マウスコマンド" "on" \
"hddtemp" "HDD温度監視ツール" "on" \
"hdparm" "ATA(IDE) HDパラメータ操作コマンド" "on" \
"icu64" "ユニコード用ライブラリ集" "on" \
"icu65" "ユニコード用ライブラリ集" "on" \
"icu67" "ユニコード用ライブラリ集" "on" \
"icu68" "ユニコード用ライブラリ集" "on" \
"keyutils" "Linux key managementユーティリティ" "on" \
"libfprint" "libfprint" "on" \
"libieee1284" "パラレルポート用 IEEL1284 ライブラリ" "on" \
"libunistring" "Unicode string library" "on" \
"libusb" "USB デバイス操作ライブラリ" "on" \
"libusb_compat" "libusb-compat ライブラリ" "on" \
"libuv" "libuv" "on" \
"libxml2" "XMLパーサライブラリ" "off" \
"libzip" "libzip" "on" \
"lm_sensors" "センサー管理ツール lmsensors" "on" \
"lshw" "ハードウェア一覧表示コマンド" "on" \
"lsof" "ファイル使用プロセス走査ツール" "on" \
"lv" "多言語対応ファイルビューワ" "on" \
"man_pages" "オンラインドキュメント集" "on" \
"man_pages_ja" "日本語マニュアルページ" "on" \
"mcelog" "マシンチェック例外情監視サービス" "on" \
"mtools" "DOS/Windows用FD操作コマンド" "on" \
"network" "ネットワーク用ツール" "off" \
"nfs" "nfs" "on" \
"nilfs_utils" "Nilfs2 ユーティリティ" "on" \
"open_iscsi" "Open-iSCSI イニシエータ" "on" \
"open_isns" "Open-iSNS" "on" \
"openslp" "OpenSLP" "on" \
"pcre" "PERL互換正規表現用ライブラリ" "on" \
"pcre2" "PERL互換正規表現用ライブラリ" "on" \
"perl" "多機能スクリプト言語 Perl" "on" \
"psmisc" "プロセス操作ツール psmisc" "on" \
"recode" "コーディング変換ツール recode" "on" \
"rpm2targz" "RPMパッケージ変換ツール" "on" \
"ruby" "オブジェクト指向スクリプト言語 Ruby" "on" \
"screen" "スクリーン操作コマンド" "on" \
"sg3_utils" "SG(SCSI Generic) utils ver3" "on" \
"sharutils" "shar/uuencode形式操作ツール" "on" \
"sqlite" "Simple なデータベースエンジン SQLite3" "on" \
"squashfs" "SquashFSツール" "on" \
"sysstat" "システム管理ツール sysstat" "on" \
"tcl" "Tcl" "on" \
"texinfo" "テキストファイルフォーマッタ" "on" \
"time" "コマンド実行時間表示コマンド" "on" \
"tree" "ディレクトリ/ファイル樹状表示コマンド" "on" \
"unzip" "ZIP形式展開ツール" "on" \
"usbutils" "USB情報表示ツール" "on" \
"utempter" "utmp操作ツール" "on" \
"vim" "vim" "on" \
"which" "コマンド位置表示コマンド" "on" \
"yaml" "YAML Ain't Markup Language" "on" \
"zip" "ZIP形式圧縮ツール" "on" \
"zsh" "高機能シェル zsh" "off" \
2> /tmp/SeTpkgs
if [ $? = 1 -o $? = 255 ]; then
  rm -f /tmp/SeTpkgs
  > /tmp/SeTnewtag
  for pkg in Python Python2 alsa aspell autofs bc berkeley_db brotli bsd_games bvi cpio cpufreqd cpufrequtils cryptsetup devel elogind emacs_bin emacs_lib emacs_mini fortune_mod fprintd gc gdbm get_pkginfo gnupg_tls gpm hddtemp hdparm icu64 icu65 icu67 icu68 keyutils libfprint libieee1284 libunistring libusb libusb_compat libuv libxml2 libzip lm_sensors lshw lsof lv man_pages man_pages_ja mcelog mtools network nfs nilfs_utils open_iscsi open_isns openslp pcre pcre2 perl psmisc recode rpm2targz ruby screen sg3_utils sharutils sqlite squashfs sysstat tcl texinfo time tree unzip usbutils utempter vim which yaml zip zsh  ; do 
  echo "$pkg: SKP" >> /tmp/SeTnewtag
  done
  exit
fi
cat /dev/null > /tmp/SeTnewtag
for PACKAGE in Python Python2 alsa aspell autofs bc berkeley_db brotli bsd_games bvi cpio cpufreqd cpufrequtils cryptsetup devel elogind emacs_bin emacs_lib emacs_mini fortune_mod fprintd gc gdbm get_pkginfo gnupg_tls gpm hddtemp hdparm icu64 icu65 icu67 icu68 keyutils libfprint libieee1284 libunistring libusb libusb_compat libuv libxml2 libzip lm_sensors lshw lsof lv man_pages man_pages_ja mcelog mtools network nfs nilfs_utils open_iscsi open_isns openslp pcre pcre2 perl psmisc recode rpm2targz ruby screen sg3_utils sharutils sqlite squashfs sysstat tcl texinfo time tree unzip usbutils utempter vim which yaml zip zsh  ; 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
