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/>.
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
function function_check {
|
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"
|
echo $"Dependency error: The function ${1} has not been defined"
|
||||||
exit 72528
|
exit 72528
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
function function_exists {
|
function function_exists {
|
||||||
if [ ! "$(type ${1} 2>/dev/null)" ]; then
|
if [ ! "$(type "${1}" 2>/dev/null)" ]; then
|
||||||
echo "0"
|
echo "0"
|
||||||
else
|
else
|
||||||
echo "1"
|
echo "1"
|
||||||
|
|
Loading…
Reference in New Issue