#!/bin/sh
cat /dev/null > /tmp/SeTnewtag
dialog --title "select pkgs from base(Qbilinux Base system)" \
  --checklist "select packages from base 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 \
"" "" "off" \
"" "" "off" \
"aaa_base" "Basic Linux file system package" "on" \
"acl" "ACL tool" "on" \
"at" "at" "on" \
"attr" "attr control tool" "on" \
"bash" "GNU bash" "on" \
"btrfs_progs" "" "on" \
"bzip2" "bzip2" "on" \
"coreutils" "GNU coreutils" "on" \
"cracklib" "cracklib" "on" \
"dcron" "Dillon cron" "on" \
"devs" "device files" "on" \
"dhcp" "ISC DHCP" "on" \
"dialog" "" "on" \
"dosfstools" "dosfstools" "on" \
"dump" "dump" "on" \
"e2fsprogs" "ext2/ext3 fs utiles" "on" \
"ed" "ed" "on" \
"efibootmgr" "" "on" \
"efivar" "" "on" \
"etc" "configuration files for /etc directory" "on" \
"eudev" "eudev" "on" \
"extipl" "a partition-selectable boot loader/installer for IBM compatible" "on" \
"fbset" "framebuffer device maintenance program" "on" \
"file" "file" "on" \
"findutils" "GNU find utility" "on" \
"gawk" "gawk(GNU AWK)  with multibyte extension" "on" \
"glibc" "" "on" \
"gptfdisk" "" "on" \
"grep" "GNU grep" "on" \
"groff" "groff with JP patch" "on" \
"grub" "GRUB : GRand Unified Boot loader" "on" \
"gzip" "GNU zip compression utilities." "on" \
"hdsetup" "Slackware setup/management packages" "on" \
"hdsetup" "Slackware setup/management packages" "on" \
"hdsetup" "Slackware setup/management packages" "on" \
"hibernate_script" "" "on" \
"inetutils" "inetutils" "on" \
"iproute2" "Advanced Networking Tools iproute2" "on" \
"iputils" "" "on" \
"kbd" "kbd" "on" \
"kmod" "kmod" "on" \
"less" "less" "on" \
"less3" "less" "on" \
"lfs_bootscripts" "lfs_bootscripts" "on" \
"libaio" "libaio" "on" \
"libarchive" "libarchive" "on" \
"libcap" "Libcap - Library to allow POSIX 1e capabilities" "on" \
"libee" "libee" "on" \
"libestr" "libestr" "on" \
"libfastjson" "libfastjson" "on" \
"libgcc" "GCC basic libraries" "on" \
"libgudev" "libgudev" "on" \
"libmnl" "libmnl" "on" \
"libseccomp" "libseccomp" "on" \
"libtirpc" "" "on" \
"libxcrypt" "libxcrypt" "on" \
"libxcrypt1" "libxcrypt" "on" \
"linux" "Linux kernel 5.x" "on" \
"linux_firmware" "" "on" \
"linux_pam" "Linux PAM" "on" \
"log4cplus" "log4cplus" "on" \
"logrotate" "logroate" "on" \
"lsb_release" "" "on" \
"lvm2" "lvm2" "on" \
"lzip" "lzip" "on" \
"lzlib" "lzlib" "on" \
"lzo" "" "on" \
"man" "man" "on" \
"mdadm" "mdadm" "on" \
"microcode_intel" "" "on" \
"mlocate" "" "on" \
"ncurses" "ncurses  libraries" "on" \
"net_tools" "network commands" "on" \
"network_configs" "" "on" \
"nkf" "Network Kanji Filter" "on" \
"nvi" "" "on" \
"open_gpu_kernel_modules" "open_gpu_kernel_modules" "on" \
"openbsd_inetd" "" "on" \
"openssh" "OpenSSH" "on" \
"openssl3" "OpenSSL" "on" \
"os_prober" "" "on" \
"pciutils" "pciutils" "on" \
"pixz" "pixz" "on" \
"plzip" "plzip" "on" \
"pm_utils" "" "on" \
"popt" "popt-1.7" "on" \
"procinfo_ng" "" "on" \
"procps_ng" "procps" "on" \
"readline" "" "on" \
"reiserfsprogs" "" "on" \
"rsyslog" "" "on" \
"sed" "GNU sed" "on" \
"shadow" "Shadow password program" "on" \
"sudo" "sudo" "on" \
"sysfsutils" "sysfs utils" "on" \
"syslinux" "" "on" \
"sysvinit" "SysVinit" "on" \
"tar" "GNU tar" "on" \
"tcp_wrappers" "TCP wrapper tools" "on" \
"tcsh" "tcsh with Japanese extentions" "on" \
"timezone" "zoneinfo-2003e + configuration commands" "on" \
"util_linux" "" "on" \
"xz" "" "on" \
"zlib" "zlib" "on" \
"zstd" "zstd" "on" \
2> /tmp/SeTpkgs
if [ $? = 1 -o $? = 255 ]; then
  rm -f /tmp/SeTpkgs
  > /tmp/SeTnewtag
  for pkg in   aaa_base acl at attr bash btrfs_progs bzip2 coreutils cracklib dcron devs dhcp dialog dosfstools dump e2fsprogs ed efibootmgr efivar etc eudev extipl fbset file findutils gawk glibc gptfdisk grep groff grub gzip hdsetup hdsetup hdsetup hibernate_script inetutils iproute2 iputils kbd kmod less less3 lfs_bootscripts libaio libarchive libcap libee libestr libfastjson libgcc libgudev libmnl libseccomp libtirpc libxcrypt libxcrypt1 linux linux_firmware linux_pam log4cplus logrotate lsb_release lvm2 lzip lzlib lzo man mdadm microcode_intel mlocate ncurses net_tools network_configs nkf nvi open_gpu_kernel_modules openbsd_inetd openssh openssl3 os_prober pciutils pixz plzip pm_utils popt procinfo_ng procps_ng readline reiserfsprogs rsyslog sed shadow sudo sysfsutils syslinux sysvinit tar tcp_wrappers tcsh timezone util_linux xz zlib zstd  ; do 
  echo "$pkg: SKP" >> /tmp/SeTnewtag
  done
  exit
fi
cat /dev/null > /tmp/SeTnewtag
for PACKAGE in   aaa_base acl at attr bash btrfs_progs bzip2 coreutils cracklib dcron devs dhcp dialog dosfstools dump e2fsprogs ed efibootmgr efivar etc eudev extipl fbset file findutils gawk glibc gptfdisk grep groff grub gzip hdsetup hdsetup hdsetup hibernate_script inetutils iproute2 iputils kbd kmod less less3 lfs_bootscripts libaio libarchive libcap libee libestr libfastjson libgcc libgudev libmnl libseccomp libtirpc libxcrypt libxcrypt1 linux linux_firmware linux_pam log4cplus logrotate lsb_release lvm2 lzip lzlib lzo man mdadm microcode_intel mlocate ncurses net_tools network_configs nkf nvi open_gpu_kernel_modules openbsd_inetd openssh openssl3 os_prober pciutils pixz plzip pm_utils popt procinfo_ng procps_ng readline reiserfsprogs rsyslog sed shadow sudo sysfsutils syslinux sysvinit tar tcp_wrappers tcsh timezone util_linux xz zlib zstd  ; 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
