This commit is contained in:
CanbiZ
2025-05-26 13:58:02 +02:00
parent ee82c05752
commit cb7ce3f27e
2 changed files with 14 additions and 9 deletions

View File

@@ -122,12 +122,10 @@ icons() {
}
# ------------------------------------------------------------------------------
# Sets default verbose mode for script execution.
# Sets default verbose mode for script and os execution.
# ------------------------------------------------------------------------------
VERBOSE="${1:-no}"
VERB=${var_verbose:-$VERBOSE}
set_std_mode() {
if [ "$VERB" = "yes" ]; then
if [ "${VERBOSE:-no}" = "yes" ]; then
STD=""
else
STD="silent"
@@ -136,11 +134,7 @@ set_std_mode() {
# Silent execution function
silent() {
if [ "$VERB" = "no" ]; then
"$@" >/dev/null 2>&1 || return 1
else
"$@" || return 1
fi
"$@" >/dev/null 2>&1
}
# ------------------------------------------------------------------------------