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

Signed-off-by: Marc S. Weidner <msw@coresecret.dev>
This commit is contained in:
2025-10-11 22:14:22 +01:00
parent be0a6c7c6a
commit 353568eb69
60 changed files with 2267 additions and 1163 deletions

View File

@@ -12,6 +12,8 @@
#######################################
# Prevent the file to be sourced twice.
# Globals:
# None
# Arguments:
# 1: File to source.
#######################################

View File

@@ -14,6 +14,8 @@ guard_sourcing
#######################################
# Generic safe wrapper for external commands.
# Globals:
# None
# Arguments:
# *: full command (array, quoted!)
# 2: ERR_CONST on failure

View File

@@ -16,6 +16,8 @@ guard_sourcing
# Converts the value of a passed variable to lowercase.
# Example:
# ensure_lowercase "VAR"
# Globals:
# None
# Arguments:
# 1: VARIABLE name only
# Returns:
@@ -40,6 +42,8 @@ readonly -f ensure_lowercase
# Converts the value of a passed variable to uppercase.
# Example:
# ensure_uppercase "VAR"
# Globals:
# None
# Arguments:
# 1: VARIABLE name only
# Returns:
@@ -64,6 +68,8 @@ readonly -f ensure_uppercase
# Removes leading and trailing spaces in the value.
# Example:
# ensure_trimmed "VAR"
# Globals:
# None
# Arguments:
# 1: VARIABLE name only
# Returns:
@@ -89,6 +95,8 @@ readonly -f ensure_trimmed
# Resets the value of the variable to a default value if it is empty or contains only whitespace.
# Example:
# reset_to_default "VAR" "fallback"
# Globals:
# None
# Arguments:
# 1: VARIABLE name only
# 2: Fallback value
@@ -119,6 +127,8 @@ readonly -f reset_to_default
# Checks whether the content of a variable matches a specific regex.
# Example:
# assert_match "FOO" '^[a-z0-9_-]+$'
# Globals:
# None
# Arguments:
# 1: VARIABLE name only
# 2: Regex in 'single quotes'

View File

@@ -14,6 +14,8 @@ guard_sourcing
#######################################
# Function to log a module success message and change pwd to script root.
# Globals:
# None
# Arguments:
# None
#######################################

View File

@@ -15,9 +15,10 @@ guard_sourcing
#######################################
# Print-colored text.
# Globals:
# MAG
# NL
# RES
# WHI
# VAR_DIALOG
# Arguments:
# 1: Color code.
# *: Text to print.
@@ -28,6 +29,9 @@ color_echo() {
declare msg="${*}"
printf "%b[INFO]%b%b %s %b%b" "${c}" "${RES}" "${MAG}" "${msg}" "${RES}" "${NL}" | tee -a "${VAR_DIALOG}"
}
### Prevents accidental 'unset -f'.
# shellcheck disable=SC2034
readonly -f color_echo
#######################################
# Print the current module in plain or colorful format.
@@ -45,4 +49,7 @@ info_echo() {
color_echo "${GRE}" "MAIN PROGRAM SEQUENCE: ${module} ..."
fi
}
### Prevents accidental 'unset -f'.
# shellcheck disable=SC2034
readonly -f info_echo
# vim: number et ts=2 sw=2 sts=2 ai tw=128 ft=sh

View File

@@ -15,11 +15,12 @@ guard_sourcing
#######################################
# Creates the DIRs, prepares the files and mounting paths for installation.
# Globals:
# DIR_LOG
# LOG_DBS
# LOG_ERR
# LOG_EXT
# LOG_INS
# LOG_NIC
# LOG_REC
# LOG_UID
# RECOVERY
# TARGET
@@ -54,4 +55,7 @@ gen_dir_files() {
return 0
}
### Prevents accidental 'unset -f'.
# shellcheck disable=SC2034
readonly -f gen_dir_files
# vim: number et ts=2 sw=2 sts=2 ai tw=128 ft=sh

View File

@@ -15,9 +15,8 @@ guard_sourcing
#######################################
# Calculates total runtime of the CISS.debian.installer.
# Globals:
# VAR_END_TIME
# SECONDS
# VAR_SCRIPT_RUNTIME
# VAR_START_TIME
# Arguments:
# None
# Returns:
@@ -33,4 +32,7 @@ calculate_runtime() {
declare -grx VAR_SCRIPT_RUNTIME="$(printf "%02dh %02dm %02ds" "${var_hours}" "${var_minutes}" "${var_seconds}")"
return 0
}
### Prevents accidental 'unset -f'.
# shellcheck disable=SC2034
readonly -f calculate_runtime
# vim: number et ts=2 sw=2 sts=2 ai tw=128 ft=sh