Signed-off-by: Andres P <[email protected]>
---
 scripts/makepkg.sh.in |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/scripts/makepkg.sh.in b/scripts/makepkg.sh.in
index d0b8b4b..28c7879 100644
--- a/scripts/makepkg.sh.in
+++ b/scripts/makepkg.sh.in
@@ -1260,7 +1260,7 @@ check_sanity() {
 
        if (( ${#pkgna...@]} > 1 )); then
                for pkg in ${pkgna...@]}; do
-                       if [[ $(type -t package_${pkg}) != "function" ]]; then
+                       if declare -f package_${pkg} >/dev/null; then
                                error "$(gettext "missing package function for 
split package '%s'")" "$pkg"
                                return 1
                        fi
@@ -1769,12 +1769,12 @@ if (( ${#pkgna...@]} > 1 )); then
 fi
 
 # test for available PKGBUILD functions
-if [[ $(type -t build) = "function" ]]; then
+if declare -f build >/dev/null; then
        BUILDFUNC=1
 fi
-if [[ $(type -t package) = "function" ]]; then
+if declare -f package >/dev/null; then
        PKGFUNC=1
-elif [[ $SPLITPKG -eq 0 && $(type -t package_${pkgname}) = "function" ]]; then
+elif [[ $SPLITPKG -eq 0 ]] && declare -f package_${pkgname} >/dev/null; then
        SPLITPKG=1
 fi
 
-- 
1.7.1


Reply via email to