Add command_exists function

This commit is contained in:
Ivan Malison 2016-08-26 16:37:13 -07:00
parent 9d0ce5db9f
commit 0887152e2e
No known key found for this signature in database
GPG Key ID: 62530EFBE99DC2F8

View File

@ -34,3 +34,7 @@ function environment_variable_exists {
eval "value=\"\${$1+x}\"" eval "value=\"\${$1+x}\""
[ ! -z $value ] [ ! -z $value ]
} }
function command_exists {
hash "$1" 2>/dev/null 1>/dev/null
}