run_func: use simply 'type foo', -t is a bash extension.
--HG-- extra : convert_revision : 8a94c0a961f4819bfada61823158c81965d31908
This commit is contained in:
parent
66d275cec7
commit
8536af44ef
1 changed files with 1 additions and 2 deletions
|
@ -32,8 +32,7 @@ run_func()
|
||||||
|
|
||||||
[ -z "$func" ] && return 1
|
[ -z "$func" ] && return 1
|
||||||
|
|
||||||
type -t $func | grep -q 'function'
|
if $(type $func | grep -q 'function'); then
|
||||||
if [ $? -eq 0 ]; then
|
|
||||||
$func
|
$func
|
||||||
return $?
|
return $?
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue