V8.02.644.2025.05.31
All checks were successful
Retrieve the DNSSEC status at the time of updating the repository. / build-dnssec-diagram (push) Successful in 30s
All checks were successful
Retrieve the DNSSEC status at the time of updating the repository. / build-dnssec-diagram (push) Successful in 30s
Signed-off-by: Marc S. Weidner <msw@coresecret.dev>
This commit is contained in:
@@ -13,17 +13,17 @@
|
||||
#######################################
|
||||
# Wrapper for statistic functions of the final build.
|
||||
# Globals:
|
||||
# BUILD_LOG
|
||||
# CHROOT_DIR
|
||||
# ERR_UNCRITICAL
|
||||
# HANDLER_BUILD_DIR
|
||||
# PACKAGES_FILE
|
||||
# VAR_BUILD_LOG
|
||||
# VAR_CHROOT_DIR
|
||||
# VAR_HANDLER_BUILD_DIR
|
||||
# VAR_PACKAGES_FILE
|
||||
# Arguments:
|
||||
# None
|
||||
#######################################
|
||||
run_analysis() {
|
||||
# shellcheck disable=SC2164
|
||||
cd "${HANDLER_BUILD_DIR}"
|
||||
cd "${VAR_HANDLER_BUILD_DIR}"
|
||||
# shellcheck disable=SC2155
|
||||
declare iso_file=$(find . -maxdepth 1 -name "*.iso" -printf "%f\n" | sort | tail -n1)
|
||||
|
||||
@@ -38,21 +38,21 @@ run_analysis() {
|
||||
# shellcheck disable=SC2155
|
||||
declare iso_size_bytes=$(du -b "${iso_file}" | awk '{print $1}')
|
||||
# shellcheck disable=SC2155
|
||||
declare chroot_size_hr=$(du -sh "${CHROOT_DIR}" 2> /dev/null | awk '{print $1}')
|
||||
declare chroot_size_hr=$(du -sh "${VAR_CHROOT_DIR}" 2> /dev/null | awk '{print $1}')
|
||||
# shellcheck disable=SC2155
|
||||
declare chroot_size_bytes=$(du -sb "${CHROOT_DIR}" 2> /dev/null | awk '{print $1}')
|
||||
declare chroot_size_bytes=$(du -sb "${VAR_CHROOT_DIR}" 2> /dev/null | awk '{print $1}')
|
||||
# shellcheck disable=SC2155
|
||||
declare compression=$(awk -v iso="${iso_size_bytes}" -v chroot="${chroot_size_bytes}" 'BEGIN { printf "%.2f%%", 100 * iso / chroot }')
|
||||
# shellcheck disable=SC2155
|
||||
declare package_count=$(wc -l < "${PACKAGES_FILE}" 2> /dev/null || echo "nicht gefunden")
|
||||
declare package_count=$(wc -l < "${VAR_PACKAGES_FILE}" 2> /dev/null || echo "nicht gefunden")
|
||||
# shellcheck disable=SC2155
|
||||
declare squash_cpu_used="$(grep -m1 -oP 'Using \K[0-9]+' "${BUILD_LOG}")"
|
||||
declare squash_cpu_used="$(grep -m1 -oP 'Using \K[0-9]+' "${VAR_BUILD_LOG}")"
|
||||
|
||||
if [[ -f "${BUILD_LOG}" ]]; then
|
||||
if [[ -f "${VAR_BUILD_LOG}" ]]; then
|
||||
# shellcheck disable=SC2155
|
||||
declare start_line=$(grep 'lb build' "${BUILD_LOG}" | head -n1 || true)
|
||||
declare start_line=$(grep 'lb build' "${VAR_BUILD_LOG}" | head -n1 || true)
|
||||
# shellcheck disable=SC2155
|
||||
declare end_line=$(grep 'lb source' "${BUILD_LOG}" | tail -n1 || true)
|
||||
declare end_line=$(grep 'lb source' "${VAR_BUILD_LOG}" | tail -n1 || true)
|
||||
|
||||
if [[ -n "${start_line}" && -n "${end_line}" ]]; then
|
||||
# shellcheck disable=SC2155
|
||||
|
||||
Reference in New Issue
Block a user