Update core.func
This commit is contained in:
parent
f150ff813b
commit
e4e44244c8
@ -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.
|
||||
# ------------------------------------------------------------------------------
|
||||
|
Loading…
x
Reference in New Issue
Block a user