V8.03.832.2025.06.24
Signed-off-by: Marc S. Weidner <msw@coresecret.dev>
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user