summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--scripts/makepkg.sh.in7
1 files changed, 6 insertions, 1 deletions
diff --git a/scripts/makepkg.sh.in b/scripts/makepkg.sh.in
index 20e9dd7e..7c1c50a3 100644
--- a/scripts/makepkg.sh.in
+++ b/scripts/makepkg.sh.in
@@ -418,7 +418,12 @@ run_function_safe() {
restoretrap=$(trap -p ERR)
trap "error_function '$1'" ERR
- run_function "$1"
+ # prefer pnd_ prefixed function if PKGEXT == .pnd
+ if [[ "$PKGEXT" == *.pnd ]] && declare -F "pnd_$1" > /dev/null; then
+ run_function "pnd_$1"
+ else
+ run_function "$1"
+ fi
eval "$restoretrap"
eval "$restoreset"