#!/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 \
"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" \
"etc" "configuration files for /etc directory" "on" \
"eudev" "eudev" "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" \
"gzip" "GNU zip compression utilities." "on" \
"hdsetup" "Slackware setup/management packages" "on" \
"hibernate_script" "" "on" \
"iproute2" "Advanced Networking Tools iproute2" "on" \
"iputils" "" "on" \
"kbd" "kbd" "on" \
"kernel7_rpi2" "Linux kernel 5.x" "on" \
"kernel7l_rpi4" "Linux kernel 5.x" "on" \
"kernel_rpi1" "Linux kernel 5.x" "on" \
"kmod" "kmod" "on" \
"less" "less" "on" \
"less3" "less" "on" \
"lfs_bootscripts" "lfs_bootscripts" "on" \
"libaio" "libaio" "on" \
"libcap" "Libcap - Library to allow POSIX 1e capabilities" "on" \
"libee" "libee" "on" \
"libestr" "libestr" "on" \
"libgcc" "GCC basic libraries" "on" \
"libgudev" "libgudev" "on" \
"libmnl" "libmnl" "on" \
"libseccomp" "libseccomp" "on" \
"libtirpc" "" "on" \
"lilo" "LILO /the LInux Loader" "on" \
"linux_firmware" "" "on" \
"linux_pam" "Linux PAM" "on" \
"logrotate" "logroate" "on" \
"lsb_release" "" "on" \
"lvm2" "lvm2" "on" \
"lzip" "lzip" "on" \
"lzlib" "lzlib" "on" \
"lzo" "" "on" \
"man" "man" "on" \
"mdadm" "mdadm" "on" \
"mlocate" "" "on" \
"ncurses" "ncurses  libraries" "on" \
"net_tools" "network commands" "on" \
"netkit_combo" "network programs" "on" \
"network_configs" "" "on" \
"nkf" "Network Kanji Filter" "on" \
"nvi" "" "on" \
"openbsd_inetd" "" "on" \
"openssh" "OpenSSH" "on" \
"openssl" "OpenSSL" "on" \
"openssl10" "OpenSSL" "on" \
"os_prober" "" "on" \
"pciutils" "pciutils" "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" \
"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" \
"traceroute" "" "on" \
"unicon_tools" "" "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 etc eudev fbset file findutils gawk glibc gptfdisk grep groff gzip hdsetup hibernate_script iproute2 iputils kbd kernel7_rpi2 kernel7l_rpi4 kernel_rpi1 kmod less less3 lfs_bootscripts libaio libcap libee libestr libgcc libgudev libmnl libseccomp libtirpc lilo linux_firmware linux_pam logrotate lsb_release lvm2 lzip lzlib lzo man mdadm mlocate ncurses net_tools netkit_combo network_configs nkf nvi openbsd_inetd openssh openssl openssl10 os_prober pciutils plzip pm_utils popt procinfo_ng procps_ng readline reiserfsprogs rsyslog sed shadow sudo sysfsutils sysvinit tar tcp_wrappers tcsh timezone traceroute unicon_tools 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 etc eudev fbset file findutils gawk glibc gptfdisk grep groff gzip hdsetup hibernate_script iproute2 iputils kbd kernel7_rpi2 kernel7l_rpi4 kernel_rpi1 kmod less less3 lfs_bootscripts libaio libcap libee libestr libgcc libgudev libmnl libseccomp libtirpc lilo linux_firmware linux_pam logrotate lsb_release lvm2 lzip lzlib lzo man mdadm mlocate ncurses net_tools netkit_combo network_configs nkf nvi openbsd_inetd openssh openssl openssl10 os_prober pciutils plzip pm_utils popt procinfo_ng procps_ng readline reiserfsprogs rsyslog sed shadow sudo sysfsutils sysvinit tar tcp_wrappers tcsh timezone traceroute unicon_tools 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
