utils.sh: fixed function_exists implementation

This commit is contained in:
2021-12-01 10:53:49 +01:00
parent 4e16dc50b2
commit 7eddfe5074

View File

@@ -21,7 +21,7 @@ export -f stdtime
# ------------------------------------------------------------------------------ # ------------------------------------------------------------------------------
# Check if a function exists, return 0 if so # Check if a function exists, return 0 if so
function_exists() { function_exists() {
declare -f -F $1 2>&1 /dev/null LC_ALL=C type -t $1 | grep function
return $? return $?
} }
export -f function_exists export -f function_exists