#!/bin/sh
cat /dev/null > /tmp/SeTnewtag
dialog --title "Select pkgs from minimum(Plamo Linux Minimum System)"   --checklist "Select packages to install from minimum series. Use cursor up/down to select the package, mark(*) by space key. Push Enter to start install." 24 72 15 "FD" "File and Directory manager FD" "on" \
"bc" "Gnu bc - arbitrary calculator language" "on" \
"bridge_utils" "ethernet bridge configuration tool" "on" \
"bvi" "binary file editor" "on" \
"ca_certificate" "CA certificate builder" "on" \
"check_update_cache" "Desktop cache updator" "on" \
"cpio" "GNU cpio" "on" \
"curl" "curl" "on" \
"emacs_bin" "Tools for Emacs" "on" \
"emacs_lib" "Emacs Lisp package" "on" \
"emacs_mini" "emacs without X" "on" \
"ethtool" "ethernet configuration tool" "on" \
"expat" "XML parsing library expat" "on" \
"gc" "Boehm GC" "on" \
"gdbm" "GNU Database Management tool" "on" \
"get_pkginfo" "e_title" "on" \
"gnupg" "Gnu Privacy Guard" "on" \
"gnutls" "secure communication library" "on" \
"gpgme" "gpgme:GnuPG Made Easy" "on" \
"gpgmepp" "C++ binding for GPGme" "on" \
"gpm" "GPM(General purpose mouse)" "on" \
"hddtemp" "HDD temperature monitoring tool" "on" \
"hdparm" "hdparm" "on" \
"hwdata" "Hardware identification database" "on" \
"inetutils" "GNU inetutils" "on" \
"inih" "library for .INI config files" "on" \
"initd_tools" "initd tools" "on" \
"iptables" "iptables" "on" \
"iw" "tool for configuring Linux wireless devices" "on" \
"keyutils" "Linux key management utils" "on" \
"krb5" "MIT Kerberos V5" "on" \
"libassuan" "libassuan, encrypt IPC communication" "on" \
"libevent" "libevent" "on" \
"libffi" "Foregin Function Interface Library" "on" \
"libgcrypt" "GNU encript library, libgcrypt" "on" \
"libgdbm" "gdbm old library" "on" \
"libgpg_error" "common error library for GnuPG" "on" \
"libksba" "X.509 certificates library" "on" \
"libmnl" "Minimum Netlink library" "on" \
"libnftnl" "nf_tables library" "on" \
"libnl" "Convenience library for netlink sockets" "on" \
"libnsl" "NIS/NIS+ library" "on" \
"libpcap" "library for packet capturing" "on" \
"libpipeline" "Pipeline library" "on" \
"libtasn1" "libtasn1 library for ANS.1 formular" "on" \
"libunistring" "Library for manipulating Unicode" "on" \
"libuv" "library for asynchronous I/O" "on" \
"libxml2" "XML Parser Library" "on" \
"lm_sensors" "lm_sensors: sensoring motherboard information" "on" \
"lshw" "list hardware command" "on" \
"lsof" "tool for list processes" "on" \
"lv" "lv" "on" \
"lzip" "lzip commpression tool" "on" \
"man_db" "man page management tools, mandb" "on" \
"man_pages" "Man-pages(on line man pages)" "on" \
"man_pages_ja" "Japanese man" "on" \
"mdadm" "mdadm" "on" \
"nettle" "Nettle - a low-level cryptographic library" "on" \
"network" "network tools" "on" \
"nfs_utils" "utils for NFS" "on" \
"nilfs_utils" "Nilfs2 Utils" "on" \
"nkf" "Network Kanji Filter" "on" \
"npth" "GNU npth library" "on" \
"ntp" "ntp" "on" \
"openssh" "OpenSSH" "on" \
"p11_kit" "P11-kit" "on" \
"parted" "GNU parted" "on" \
"perl" "multifunctional scripting language Perl" "on" \
"perl_XML_Parser" "Perl::XML_Parser" "on" \
"rpcbind" "rpcbind rpc port manager" "on" \
"rpcsvc_proto" "the rcpsvc protocol.x files and headers" "on" \
"rpm2targz" "rpm2targz" "on" \
"rsync" "rsync" "on" \
"screen" "screen control command" "on" \
"sg3_utils" "SG(SCSI Generic) utils ver3" "on" \
"sharutils" "sharutils" "on" \
"sqlite" "Simple Database engine SQLite3" "on" \
"squashfs_tools" "Tools for SquashFS" "on" \
"stunnel" "SSL encrypton wrapper" "on" \
"sysstat" "system monitor tool sysstat" "on" \
"texinfo" "GNU texinfo" "on" \
"time" "time" "on" \
"tree" "tree" "on" \
"unzip" "unzip" "on" \
"userspace_rcu" "user area RCU library" "on" \
"w3m" "W3M(Web wo Miru)" "on" \
"wget" "wget" "on" \
"wpa_supplicant" "e_title" "on" \
"xfsprogs" "tools for the XFS filesystem" "on" \
"yaml" "YAML Ain't Markup Language" "on" \
"zip" "zip" "on" \
"zsh" "zsh" "on" \
2> /tmp/SeTpkgs
if [ $? = 1 -o $? = 255 ]; then
  rm -f /tmp/SeTpkgs
  > /tmp/SeTnewtag
  for pkg in FD bc bridge_utils bvi ca_certificate check_update_cache cpio curl emacs_bin emacs_lib emacs_mini ethtool expat gc gdbm get_pkginfo gnupg gnutls gpgme gpgmepp gpm hddtemp hdparm hwdata inetutils inih initd_tools iptables iw keyutils krb5 libassuan libevent libffi libgcrypt libgdbm libgpg_error libksba libmnl libnftnl libnl libnsl libpcap libpipeline libtasn1 libunistring libuv libxml2 lm_sensors lshw lsof lv lzip man_db man_pages man_pages_ja mdadm nettle network nfs_utils nilfs_utils nkf npth ntp openssh p11_kit parted perl perl_XML_Parser rpcbind rpcsvc_proto rpm2targz rsync screen sg3_utils sharutils sqlite squashfs_tools stunnel sysstat texinfo time tree unzip userspace_rcu w3m wget wpa_supplicant xfsprogs yaml zip zsh  ; do 
  echo "$pkg: SKP" >> /tmp/SeTnewtag
  done
  exit
fi
cat /dev/null > /tmp/SeTnewtag
for PACKAGE in FD bc bridge_utils bvi ca_certificate check_update_cache cpio curl emacs_bin emacs_lib emacs_mini ethtool expat gc gdbm get_pkginfo gnupg gnutls gpgme gpgmepp gpm hddtemp hdparm hwdata inetutils inih initd_tools iptables iw keyutils krb5 libassuan libevent libffi libgcrypt libgdbm libgpg_error libksba libmnl libnftnl libnl libnsl libpcap libpipeline libtasn1 libunistring libuv libxml2 lm_sensors lshw lsof lv lzip man_db man_pages man_pages_ja mdadm nettle network nfs_utils nilfs_utils nkf npth ntp openssh p11_kit parted perl perl_XML_Parser rpcbind rpcsvc_proto rpm2targz rsync screen sg3_utils sharutils sqlite squashfs_tools stunnel sysstat texinfo time tree unzip userspace_rcu w3m wget wpa_supplicant xfsprogs 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

