metrics.sh/lib/utils/functions.sh

11 lines
176 B
Bash
Raw Normal View History

2015-02-22 18:36:04 +01:00
#!/bin/sh
# this is bad, but `declare -f -F` is not portable
2015-02-21 18:49:18 +01:00
is_function () {
type $1 2> /dev/null | grep -q 'function$'
2015-03-22 13:55:14 +01:00
}
command_exists () {
type $1 > /dev/null 2>&1
}