usage of printf improved, format and ensuring root privileges for setup scripts now is more reliable

This commit is contained in:
m8in
2026-05-08 00:13:12 +02:00
parent 1c94a26710
commit ee114ee732
7 changed files with 40 additions and 52 deletions
+3 -3
View File
@@ -161,8 +161,8 @@ function prepare.setPATH() {
function base.abort() {
# Minimalmode in case of emergency
[[ "${COLOR[SET]:+isset}" != "isset" ]] \
&& printf %b "\nScript aborted during preparation (State: '${CIS[SET]:-""}')!\n" >&2 \
&& printf %b " ${@}\n\n" >&2 \
&& printf "\n%b\n" "Script aborted during preparation (State: '${CIS[SET]:-""}')!" >&2 \
&& printf " %b\n\n" "${@}" >&2 \
&& exit 1
local _FULLSCRIPTNAME=$(readlink -e "${0}" 2> /dev/null)
@@ -269,7 +269,7 @@ function base.printEnvironment() {
echo "Content of array CIS: (all folders end with an tailing '/')"
echo "-----------------------------------------------------------"
for _KEY in "${!CIS[@]}"; do
printf " %s\n" "CIS[${_KEY}]: ${CIS[${_KEY}]}"
printf " %s: %s\n" "CIS[${_KEY}]" "${CIS[${_KEY}]}"
done
return 0
}