Tidying function checking utils

This commit is contained in:
Bob Mottram 2018-02-25 17:32:57 +00:00
parent feca89a19f
commit 05f39281f2
1 changed files with 2 additions and 2 deletions

View File

@ -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"