Update core.func
This commit is contained in:
parent
456284e541
commit
16d437a199
@ -21,7 +21,7 @@ load_functions() {
|
|||||||
formatting
|
formatting
|
||||||
icons
|
icons
|
||||||
default_vars
|
default_vars
|
||||||
set_std_mode
|
silent
|
||||||
# add more
|
# add more
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -96,17 +96,7 @@ 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}"
|
|
||||||
|
|
||||||
set_std_mode() {
|
|
||||||
if [ "$VERBOSE" = "yes" ]; then
|
|
||||||
STD=""
|
|
||||||
else
|
|
||||||
STD="silent"
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
# Silent execution function
|
|
||||||
silent() {
|
silent() {
|
||||||
if [ "$VERBOSE" = "no" ]; then
|
if [ "$VERBOSE" = "no" ]; then
|
||||||
"$@" >/dev/null 2>&1 || return 1
|
"$@" >/dev/null 2>&1 || return 1
|
||||||
|
Loading…
x
Reference in New Issue
Block a user