V8.00.000.2025.06.17
All checks were successful
🛡️ Shell Script Linting / 🛡️ Shell Script Linting (push) Successful in 39s

Signed-off-by: Marc S. Weidner <msw@coresecret.dev>
This commit is contained in:
2025-07-24 23:01:23 +02:00
parent 1983e0229f
commit c026d9a324
48 changed files with 269 additions and 284 deletions

View File

@@ -24,32 +24,33 @@ guard_sourcing
minimal_toolset() {
declare var_bin
### Define HashMap: command -> package
# shellcheck disable=SC2154
declare -A hmp_tool_pkg=(
["awk"]="gawk"
["busybox"]="busybox"
["cat"]="coreutils"
["chmod"]="coreutils"
["chown"]="coreutils"
["chpasswd"]="passwd"
["chsh"]="passwd"
["cp"]="coreutils"
["cryptsetup"]="cryptsetup-initramfs"
["echo"]="coreutils"
["grep"]="grep"
["ip"]="iproute2"
["ln"]="coreutils"
["mkdir"]="coreutils"
["ping"]="iputils-ping"
["sed"]="sed"
["sudo"]="sudo"
["update-initramfs"]="initramfs-tools"
["zsh"]="zsh"
[awk]="gawk"
[busybox]="busybox"
[cat]="coreutils"
[chmod]="coreutils"
[chown]="coreutils"
[chpasswd]="passwd"
[chsh]="passwd"
[cp]="coreutils"
[cryptsetup]="cryptsetup-initramfs"
[echo]="coreutils"
[grep]="grep"
[ip]="iproute2"
[ln]="coreutils"
[mkdir]="coreutils"
[ping]="iputils-ping"
[sed]="sed"
[sudo]="sudo"
[update-initramfs]="initramfs-tools"
[zsh]="zsh"
)
for var_bin in "${!hmp_tool_pkg[@]}"; do
if ! do_in_target_script "${TARGET}" "command -v ${var_bin} >/dev/null"; then
do_in_target "${TARGET}" apt-get install -y "${hmp_tool_pkg[${var_bin}]}"
do_log "debug" "true" "Tool '${var_bin}' missing, installing '${hmp_tool_pkg[${var_bin}]}'."
fi
done