From e8e2fa0182cdc65473d208da25c6faa71735c8bdd2d0111067cf8cd9dff39198 Mon Sep 17 00:00:00 2001 From: "Marc S. Weidner" Date: Tue, 24 Jun 2025 21:31:24 +0200 Subject: [PATCH] V8.03.832.2025.06.24 Signed-off-by: Marc S. Weidner --- .gitea/trigger/t_generate_PRIVATE_iso_flavour_1.yaml | 2 +- README.md | 4 ++-- docs/CHANGELOG.md | 1 + lib/lib_check_pkgs.sh | 7 +++++-- lib/lib_trap_on_err.sh | 6 +++--- lib/lib_trap_on_exit.sh | 4 ++-- 6 files changed, 14 insertions(+), 10 deletions(-) diff --git a/.gitea/trigger/t_generate_PRIVATE_iso_flavour_1.yaml b/.gitea/trigger/t_generate_PRIVATE_iso_flavour_1.yaml index b306791..7a92cf6 100644 --- a/.gitea/trigger/t_generate_PRIVATE_iso_flavour_1.yaml +++ b/.gitea/trigger/t_generate_PRIVATE_iso_flavour_1.yaml @@ -10,6 +10,6 @@ # SPDX-Security-Contact: security@coresecret.eu build: - counter: 1023 + counter: 1024 version: V8.03.832.2025.06.24 # vim: number et ts=2 sw=2 sts=2 ai tw=128 ft=yaml diff --git a/README.md b/README.md index c7ab15b..b10486f 100644 --- a/README.md +++ b/README.md @@ -11,8 +11,8 @@ include_toc: true [![Static Badge](https://badges.coresecret.dev/badge/shellformat-passed-white?style=plastic&logo=google&logoColor=white&logoSize=auto&label=shellformat&color=%234285F4)](https://github.com/mvdan/sh)   [![Static Badge](https://badges.coresecret.dev/badge/Shellstyle-Google-white?style=plastic&logo=google&logoColor=white&logoSize=auto&label=Shellstyle&color=%234285F4)](https://google.github.io/styleguide/shellguide.html)   -[![Static Badge](https://badges.coresecret.dev/badge/Gitea-1.23.8-white?style=plastic&logo=gitea&logoColor=white&logoSize=auto&label=gitea&color=%23609926)](https://docs.gitea.com/)   -[![Static Badge](https://badges.coresecret.dev/badge/IntelliJ-2025.1.2-white?style=plastic&logo=intellijidea&logoColor=white&logoSize=auto&label=IntelliJ&color=%23000000)](https://www.jetbrains.com/store/?section=personal&billing=yearly)   +[![Static Badge](https://badges.coresecret.dev/badge/Gitea-1.24.2-white?style=plastic&logo=gitea&logoColor=white&logoSize=auto&label=gitea&color=%23609926)](https://docs.gitea.com/)   +[![Static Badge](https://badges.coresecret.dev/badge/IntelliJ-2025.1.3-white?style=plastic&logo=intellijidea&logoColor=white&logoSize=auto&label=IntelliJ&color=%23000000)](https://www.jetbrains.com/store/?section=personal&billing=yearly)   [![Static Badge](https://badges.coresecret.dev/badge/keepassxc-2.7.10-white?style=plastic&logo=keepassxc&logoColor=white&logoSize=auto&label=KeePassXC&color=%236CAC4D)](https://keepassxc.org/)   [![Static Badge](https://badges.coresecret.dev/badge/netcup-Netcup-white?style=plastic&logo=netcup&logoColor=white&logoSize=auto&label=powered&color=%23056473)](https://www.netcup.com/de)   [![Static Badge](https://badges.coresecret.dev/badge/powered-Centurion-white?style=plastic&logo=europeanunion&logoColor=white&logoSize=auto&label=powered&color=%230F243E)](https://coresecret.eu/)   diff --git a/docs/CHANGELOG.md b/docs/CHANGELOG.md index 5c509c5..d307d43 100644 --- a/docs/CHANGELOG.md +++ b/docs/CHANGELOG.md @@ -18,6 +18,7 @@ include_toc: true * [lib_check_provider.sh](../lib/lib_check_provider.sh) * [lib_debug_header.sh](../lib/lib_debug_header.sh) * [lib_trap_on_err.sh](../lib/lib_trap_on_err.sh) +* The Debian package ``bat`` will be installed to enable smooth log reading. ## V8.03.768.2025.06.23 diff --git a/lib/lib_check_pkgs.sh b/lib/lib_check_pkgs.sh index ce5e8c1..0e62da4 100644 --- a/lib/lib_check_pkgs.sh +++ b/lib/lib_check_pkgs.sh @@ -20,6 +20,10 @@ guard_sourcing check_pkgs() { apt-get update -y > /dev/null 2>&1 + if [[ -z "$(command -v batcat || true)" ]]; then + apt-get install -y --no-install-recommends bat + fi + if [[ -z "$(command -v lsb_release || true)" ]]; then apt-get install -y --no-install-recommends lsb-release fi @@ -45,8 +49,7 @@ check_pkgs() { fi if [[ -z "$(command -v mkpasswd || true)" ]]; then - apt-get update -y - apt-get install --no-install-recommends whois -y + apt-get install -y --no-install-recommends whois fi } # vim: number et ts=2 sw=2 sts=2 ai tw=128 ft=sh diff --git a/lib/lib_trap_on_err.sh b/lib/lib_trap_on_err.sh index f90e396..ccdd9f6 100644 --- a/lib/lib_trap_on_err.sh +++ b/lib/lib_trap_on_err.sh @@ -93,11 +93,11 @@ print_scr_err() { printf "\e[91m❌ Arguments Original : %s \e[0m\n" "${ARG_STR_ORG_INPUT}" >&2 printf "\e[91m❌ Arguments Sanitized : %s \e[0m\n" "${VAR_ARG_SANITIZED}" >&2 printf "\e[91m❌ Error Log saved at : %s \e[0m\n" "${LOG_ERROR}" >&2 - printf "\e[91m❌ cat %s \e[0m\n" "${LOG_ERROR}" >&2 + printf "\e[91m❌ batcat %s \e[0m\n" "${LOG_ERROR}" >&2 if "${VAR_EARLY_DEBUG}"; then printf "\e[91m❌ Vars Dump saved at : %s \e[0m\n" "${LOG_VAR}" >&2 printf "\e[91m❌ Debug Log saved at : %s \e[0m\n" "${LOG_DEBUG}" >&2 - printf "\e[91m❌ cat %s \e[0m\n" "${LOG_DEBUG}" >&2 + printf "\e[91m❌ batcat %s \e[0m\n" "${LOG_DEBUG}" >&2 fi printf "\n" } @@ -119,12 +119,12 @@ print_scr_err() { # $5: ${BASH_COMMAND} ####################################### trap_on_err() { + trap - ERR declare -g ERRCODE="$1" declare -g ERRSCRT="$2" declare -g ERRLINE="$3" declare -g ERRFUNC="$4" declare -g ERRCMMD="$5" - trap - ERR if "${VAR_EARLY_DEBUG}"; then dump_user_vars; fi clean_up "${ERRCODE}" if ! $VAR_HANDLER_AUTOBUILD; then clean_screen; fi diff --git a/lib/lib_trap_on_exit.sh b/lib/lib_trap_on_exit.sh index 027436a..be89660 100644 --- a/lib/lib_trap_on_exit.sh +++ b/lib/lib_trap_on_exit.sh @@ -20,8 +20,8 @@ guard_sourcing # $1: $? ####################################### trap_on_exit() { - declare -r var_trap_on_exit_code="$1" trap - EXIT + declare -r var_trap_on_exit_code="$1" if (( var_trap_on_exit_code == 0 )); then if "${VAR_EARLY_DEBUG}"; then dump_user_vars; fi clean_up "${var_trap_on_exit_code}" @@ -57,7 +57,7 @@ print_scr_exit() { printf "\e[92m✅ Script Runtime : %s \e[0m\n" "${SECONDS}" printf "\e[92m✅ Vars Dump saved at: %s \e[0m\n" "${LOG_VAR}" printf "\e[92m✅ Debug Log saved at: %s \e[0m\n" "${LOG_DEBUG}" - printf "\e[92m✅ cat %s \e[0m\n" "${LOG_DEBUG}" + printf "\e[92m✅ batcat %s \e[0m\n" "${LOG_DEBUG}" printf "\n" fi printf "\e[95m💷 Please consider donating to my work at: \e[0m\n"