Update core.func

This commit is contained in:
CanbiZ 2025-05-08 09:21:19 +02:00
parent f150ff813b
commit e4e44244c8

View File

@ -87,6 +87,26 @@ default_vars() {
i=$RETRY_NUM
}
# ------------------------------------------------------------------------------
# Sets default verbose mode for script execution.
# ------------------------------------------------------------------------------
set_std_mode() {
if [ "$VERB" = "yes" ]; then
STD=""
else
STD="silent"
fi
}
# Silent execution function
silent() {
if [ "$VERB" = "no" ]; then
"$@" >/dev/null 2>&1 || return 1
else
"$@" || return 1
fi
}
# ------------------------------------------------------------------------------
# Performs a curl request with retry logic and inline feedback.
# ------------------------------------------------------------------------------