Tidying function checking utils
This commit is contained in:
parent
feca89a19f
commit
05f39281f2
|
@ -29,14 +29,14 @@
|
|||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
function function_check {
|
||||
if [ ! "$(type ${1} 2>/dev/null)" ]; then
|
||||
if [ ! "$(type "${1}" 2>/dev/null)" ]; then
|
||||
echo $"Dependency error: The function ${1} has not been defined"
|
||||
exit 72528
|
||||
fi
|
||||
}
|
||||
|
||||
function function_exists {
|
||||
if [ ! "$(type ${1} 2>/dev/null)" ]; then
|
||||
if [ ! "$(type "${1}" 2>/dev/null)" ]; then
|
||||
echo "0"
|
||||
else
|
||||
echo "1"
|
||||
|
|
Loading…
Reference in New Issue