mirror of
https://github.com/pstadler/metrics.sh.git
synced 2025-02-28 13:59:12 -05:00
11 lines
176 B
Bash
11 lines
176 B
Bash
#!/bin/sh
|
|
|
|
# this is bad, but `declare -f -F` is not portable
|
|
is_function () {
|
|
type $1 2> /dev/null | grep -q 'function$'
|
|
}
|
|
|
|
command_exists () {
|
|
type $1 > /dev/null 2>&1
|
|
}
|