V8.00.000.2025.06.17
All checks were successful
🛡️ Shell Script Linting / 🛡️ Shell Script Linting (push) Successful in 54s
All checks were successful
🛡️ Shell Script Linting / 🛡️ Shell Script Linting (push) Successful in 54s
Signed-off-by: Marc S. Weidner <msw@coresecret.dev>
This commit is contained in:
@@ -22,39 +22,85 @@ guard_sourcing
|
|||||||
check_pkgs() {
|
check_pkgs() {
|
||||||
### Declare Arrays, HashMaps, and Variables.
|
### Declare Arrays, HashMaps, and Variables.
|
||||||
# shellcheck disable=SC2154
|
# shellcheck disable=SC2154
|
||||||
declare -A hmp_command_packages=(
|
declare -A hmp_tool_pkg=(
|
||||||
[apt-transport-https]=apt-transport-https
|
[apt-show-versions]="apt-show-versions"
|
||||||
[bzip2]=bzip2
|
[bc]="bc"
|
||||||
[ca-certificates]=ca-certificates
|
[dig]="bind9-dnsutils"
|
||||||
[curl]=curl
|
[host]="bind9-dnsutils"
|
||||||
[expect]=expect
|
[hexdump]="bsdmainutils"
|
||||||
[fdisk]=fdisk
|
[btrfs]="btrfs-progs"
|
||||||
[gdisk]=gdisk
|
[bunzip2]="bzip2"
|
||||||
[git]=git
|
[setupcon]="console-setup"
|
||||||
[gpg]=gnupg
|
[base64]="coreutils"
|
||||||
[lsb_release]=lsb-release
|
[cat]="coreutils"
|
||||||
[mkfs.btrfs]=btrfs-progs
|
[chmod]="coreutils"
|
||||||
[mkfs.ext4]=e2fsprogs
|
[chown]="coreutils"
|
||||||
[mkfs.fat]=dosfstools
|
[cp]="coreutils"
|
||||||
[mkswap]=util-linux
|
[echo]="coreutils"
|
||||||
[mkfs.xfs]=xfsprogs
|
[ln]="coreutils"
|
||||||
[parted]=parted
|
[mkdir]="coreutils"
|
||||||
[pwgen]=pwgen
|
[curl]="curl"
|
||||||
[tar]=tar
|
[dirmngr]="dirmngr"
|
||||||
[wget]=wget
|
[dmsetup]="dmsetup"
|
||||||
[whois]=whois
|
[fsck.vfat]="dosfstools"
|
||||||
[xz]=xz-utils
|
[mkfs.vfat]="dosfstools"
|
||||||
[yq]=yq
|
[e2label]="e2fsprogs"
|
||||||
|
[tune2fs]="e2fsprogs"
|
||||||
|
[fsck]="e2fsprogs"
|
||||||
|
[expect]="expect"
|
||||||
|
[efibootmgr]="efibootmgr"
|
||||||
|
[fdisk]="fdisk"
|
||||||
|
[file]="file"
|
||||||
|
[awk]="gawk"
|
||||||
|
[gdisk]="gdisk"
|
||||||
|
[gnupg]="gnupg"
|
||||||
|
[grep]="grep"
|
||||||
|
[gzip]="gzip"
|
||||||
|
[haveged]="haveged"
|
||||||
|
[update-initramfs]="initramfs-tools"
|
||||||
|
[ip]="iproute2"
|
||||||
|
[ping]="iputils-ping"
|
||||||
|
[jq]="jq"
|
||||||
|
[loadkeys]="kbd"
|
||||||
|
[setfont]="kbd"
|
||||||
|
[keyctl]="keyutils"
|
||||||
|
[modprobe]="kmod"
|
||||||
|
[libpam-pwquality]="libpam-pwquality"
|
||||||
|
[logrotate]="logrotate"
|
||||||
|
[lsb_release]="lsb-release"
|
||||||
|
[parted]="parted"
|
||||||
|
[chpasswd]="passwd"
|
||||||
|
[chsh]="passwd"
|
||||||
|
[lspci]="pciutils"
|
||||||
|
[sysctl]="procps"
|
||||||
|
[pwgen]="pwgen"
|
||||||
|
[sed]="sed"
|
||||||
|
[sudo]="sudo"
|
||||||
|
[tar]="tar"
|
||||||
|
[tree]="tree"
|
||||||
|
[unzip]="unzip"
|
||||||
|
[lsusb]="usbutils"
|
||||||
|
[blkid]="util-linux"
|
||||||
|
[dmesg]="util-linux"
|
||||||
|
[lsblk]="util-linux"
|
||||||
|
[findmnt]="util-linux"
|
||||||
|
[mount]="util-linux"
|
||||||
|
[umount]="util-linux"
|
||||||
|
[xxd]="vim-common"
|
||||||
|
[wget]="wget"
|
||||||
|
[whois]="whois"
|
||||||
|
[zsh]="zsh"
|
||||||
|
[zstd]="zstd"
|
||||||
)
|
)
|
||||||
declare -a ary_missing_pkgs=() ary_unique_pkgs=()
|
declare -a ary_missing_pkgs=() ary_unique_pkgs=()
|
||||||
declare var_cmd=""
|
declare var_bin=""
|
||||||
|
|
||||||
### Collecting missing binaries.
|
### Collecting missing binaries.
|
||||||
for var_cmd in "${!hmp_command_packages[@]}"; do
|
for var_bin in "${!hmp_tool_pkg[@]}"; do
|
||||||
|
|
||||||
if ! command -v "${var_cmd}" &>/dev/null; then
|
if ! command -v "${var_bin}" &>/dev/null; then
|
||||||
|
|
||||||
ary_missing_pkgs+=("${hmp_command_packages[${var_cmd}]}")
|
ary_missing_pkgs+=("${hmp_tool_pkg[${var_bin}]}")
|
||||||
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user