#!/bin/sh
cat /dev/null > /tmp/SeTnewtag
dialog --title "select pkgs from minimum(Qbilinux Minimum System)" \
  --checklist "select packages from minimum series. \
You can move cursor with UP/DOWN key and push space \
key to select pkgs. After finish selecting, \
push Enter to start installation. " 24 72 15 \
"Python" "" "on" \
"Python" "" "on" \
"alsa" "ALSA library/tools" "on" \
"aspell" "advanced fast spell checker aspell" "off" \
"autofs" "autofs" "on" \
"bc" "Gnu bc - arbitrary calculator language" "off" \
"berkeley_db" "Berkeley DB" "on" \
"brotli" "brotli" "on" \
"bsd_games" "Classic games from BSD" "on" \
"bvi" "binary file editor" "on" \
"cpio" "GNU cpio" "on" \
"cpufreqd" "CPU frequency control daemon" "on" \
"cpufrequtils" "cpufrequtils" "on" \
"cryptsetup" "configures encrypted block devices" "on" \
"devel" "C/C++ language development tools" "off" \
"elogind" "elogind" "on" \
"emacs_bin" "" "on" \
"emacs_lib" "" "on" \
"emacs_nox" "" "on" \
"fortune_mod" "provides fortune cookies on demand" "on" \
"fprintd" "fprintd" "on" \
"gc" "Boehm GC" "off" \
"gdbm" "GNU Database Management tool" "on" \
"get_pkginfo" "" "on" \
"gnupg_tls" "GnuPG andl GnuTLS" "on" \
"gpm" "GPM(General purpose mouse)" "on" \
"hddtemp" "HDD temperature monitoring tool" "on" \
"hdparm" "hdparm" "on" \
"icu72" "" "on" \
"icu73" "" "on" \
"icu74" "" "on" \
"icu75" "" "on" \
"jansson" "C library for handling JSON data" "on" \
"keyutils" "" "on" \
"libfprint" "libfprint" "on" \
"libieee1284" "" "on" \
"libunistring" "Unicode string library" "on" \
"libusb" "Userspace application to USB devices" "on" \
"libusb_compat" "libusb-compat library" "on" \
"libutempter" "" "on" \
"libuv" "libuv" "on" \
"libxml2" "XML Parser Library" "off" \
"libzip" "libzip" "on" \
"lm_sensors" "lm_sensors: sensoring motherboard information" "on" \
"lshw" "lshw" "on" \
"lsof" "lsof" "on" \
"lv" "lv" "on" \
"lz4" "lz4" "on" \
"mcelog" "Machine-check exception monitoring service" "on" \
"mtools" "mtools" "on" \
"network" "network tools" "off" \
"nfs" "nfs" "on" \
"nilfs_utils" "Nilfs2 Utils" "on" \
"open_iscsi" "High performance, transport independent iSCSI implementation" "on" \
"open_isns" "Open-iSNS" "on" \
"openslp" "" "on" \
"pam_wrapper" "pam_wrapper" "on" \
"pcre" "pcre" "on" \
"pcre2" "pcre" "on" \
"perl" "multifunctional scripting language Perl" "on" \
"psmisc" "psmisc utils" "on" \
"recode" "character set conversion utility recode" "on" \
"rpm2targz" "rpm2targz" "on" \
"ruby" "Ruby: Object Oriented Scripting Language" "on" \
"screen" "" "on" \
"sg3_utils" "SG(SCSI Generic) utils ver3" "on" \
"sharutils" "sharutils" "on" \
"sqlite" "Simple Database engine SQLite3" "on" \
"squashfs" "SquashFS tools" "on" \
"sysstat" "" "on" \
"tcl" "Tcl" "on" \
"texinfo" "GNU texinfo" "on" \
"time" "time" "on" \
"tree" "tree" "on" \
"unzip" "unzip" "on" \
"usbutils" "usbutils" "on" \
"vim" "" "on" \
"which" "which" "on" \
"yaml" "" "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 Python alsa aspell autofs bc berkeley_db brotli bsd_games bvi cpio cpufreqd cpufrequtils cryptsetup devel elogind emacs_bin emacs_lib emacs_nox fortune_mod fprintd gc gdbm get_pkginfo gnupg_tls gpm hddtemp hdparm icu72 icu73 icu74 icu75 jansson keyutils libfprint libieee1284 libunistring libusb libusb_compat libutempter libuv libxml2 libzip lm_sensors lshw lsof lv lz4 mcelog mtools network nfs nilfs_utils open_iscsi open_isns openslp pam_wrapper pcre pcre2 perl psmisc recode rpm2targz ruby screen sg3_utils sharutils sqlite squashfs sysstat tcl texinfo time tree unzip usbutils vim which yaml zip zsh  ; do 
  echo "$pkg: SKP" >> /tmp/SeTnewtag
  done
  exit
fi
cat /dev/null > /tmp/SeTnewtag
for PACKAGE in Python Python alsa aspell autofs bc berkeley_db brotli bsd_games bvi cpio cpufreqd cpufrequtils cryptsetup devel elogind emacs_bin emacs_lib emacs_nox fortune_mod fprintd gc gdbm get_pkginfo gnupg_tls gpm hddtemp hdparm icu72 icu73 icu74 icu75 jansson keyutils libfprint libieee1284 libunistring libusb libusb_compat libutempter libuv libxml2 libzip lm_sensors lshw lsof lv lz4 mcelog mtools network nfs nilfs_utils open_iscsi open_isns openslp pam_wrapper pcre pcre2 perl psmisc recode rpm2targz ruby screen sg3_utils sharutils sqlite squashfs sysstat tcl texinfo time tree unzip usbutils 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
