Files
CISS.debian.live.builder/lib/lib_check_pkgs.sh
T
msw ec3aca7fc8
🛡️ Retrieve DNSSEC status of coresecret.dev. / 🛡️ Retrieve DNSSEC status of coresecret.dev. (push) Has been cancelled
🛡️ Shell Script Linting / 🛡️ Shell Script Linting (push) Has been cancelled
💙 Generating a PUBLIC Live ISO. / 💙 Generating a PUBLIC Live ISO. (push) Has been cancelled
🔐 Generating a Private Live ISO TRIXIE. / 🔐 Generating a Private Live ISO TRIXIE. (push) Has been cancelled
V9.14.008.2026.06.04
Signed-off-by: Marc S. Weidner <msw@coresecret.dev>
2026-06-04 18:19:09 +01:00

87 lines
2.2 KiB
Bash

#!/bin/bash
# SPDX-Version: 3.0
# SPDX-CreationInfo: 2025-05-05; WEIDNER, Marc S.; <msw@coresecret.dev>
# SPDX-ExternalRef: GIT https://git.coresecret.dev/msw/CISS.debian.live.builder.git
# SPDX-FileContributor: WEIDNER, Marc S.; Centurion Intelligence Consulting Agency
# SPDX-FileCopyrightText: 2024-2025; WEIDNER, Marc S.; <msw@coresecret.dev>
# SPDX-FileType: SOURCE
# SPDX-License-Identifier: LicenseRef-CNCL-1.1 OR LicenseRef-CCLA-1.1
# SPDX-LicenseComment: This file is part of the CISS.debian.installer.secure framework.
# SPDX-PackageName: CISS.debian.live.builder
# SPDX-Security-Contact: security@coresecret.eu
guard_sourcing || return "${ERR_GUARD_SRCE}"
#######################################
# Check for required Deb Packages to run the script.
# Globals:
# BASH_SOURCE
# VAR_CISS_SECUREBOOT_PROFILE
# VAR_HANDLER_AUTOBUILD
# Arguments:
# None
# Returns:
# 0: on success
#######################################
check_pkgs() {
printf "\e[95m🧪 %s starting ... \e[0m\n" "${BASH_SOURCE[0]}"
apt-get update -qq > /dev/null 2>&1
apt-get install -y --no-install-recommends gnupg gpgv gpg-agent pinentry-curses pinentry-tty gnupg-utils
if ! command -v lsb_release >/dev/null 2>&1; then
apt-get install -y --no-install-recommends lsb-release
fi
if ! command -v batcat >/dev/null 2>&1; then
apt-get install -y --no-install-recommends bat
fi
if ! command -v debootstrap >/dev/null 2>&1; then
apt-get install -y debootstrap
fi
if [[ ! -f /usr/share/live/build/VERSION ]]; then
apt-get install -y live-build
fi
if [[ "${VAR_HANDLER_AUTOBUILD}" == "false" ]]; then
if ! command -v dialog >/dev/null 2>&1; then
apt-get install -y --no-install-recommends dialog
fi
fi
if ! command -v mkpasswd >/dev/null 2>&1; then
apt-get install -y --no-install-recommends whois
fi
if [[ "${VAR_CISS_SECUREBOOT_PROFILE,,}" == "ciss-uki" ]]; then
apt-get install -y --no-install-recommends dosfstools mtools sbsigntool systemd-boot-efi systemd-ukify
fi
printf "\e[92m✅ %s successfully applied. \e[0m\n" "${BASH_SOURCE[0]}"
return 0
}
### Prevents accidental 'unset -f'.
# shellcheck disable=SC2034
readonly -f check_pkgs
# vim: number et ts=2 sw=2 sts=2 ai tw=128 ft=sh