Update core.func
This commit is contained in:
parent
7f3d371262
commit
2d9c8e6136
@ -21,7 +21,7 @@ load_functions() {
|
|||||||
formatting
|
formatting
|
||||||
icons
|
icons
|
||||||
default_vars
|
default_vars
|
||||||
silent
|
set_std_mode
|
||||||
# add more
|
# add more
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -96,16 +96,21 @@ if [ -v VERBOSE ]; then
|
|||||||
else
|
else
|
||||||
echo "DEBUG: VERBOSE was not defined, applying default"
|
echo "DEBUG: VERBOSE was not defined, applying default"
|
||||||
fi
|
fi
|
||||||
|
VERBOSE="${1:-no}"
|
||||||
|
|
||||||
silent() {
|
set_std_mode() {
|
||||||
echo "DEBUG: VERBOSE: '$VERBOSE'"
|
if [ "$VERBOSE" = "yes" ]; then
|
||||||
if [ "$VERBOSE" = "no" ]; then
|
STD=""
|
||||||
"$@" >/dev/null 2>&1 || return 1
|
|
||||||
else
|
else
|
||||||
"$@" || return 1
|
STD="silent"
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# Silent execution function
|
||||||
|
silent() {
|
||||||
|
"$@" >/dev/null 2>&1
|
||||||
|
}
|
||||||
|
|
||||||
# ------------------------------------------------------------------------------
|
# ------------------------------------------------------------------------------
|
||||||
# Performs a curl request with retry logic and inline feedback.
|
# Performs a curl request with retry logic and inline feedback.
|
||||||
# ------------------------------------------------------------------------------
|
# ------------------------------------------------------------------------------
|
||||||
|
Loading…
x
Reference in New Issue
Block a user