From a7f6049d1097b202d21beb59145b121bf10db370 Mon Sep 17 00:00:00 2001 From: Jari Vetoniemi Date: Tue, 8 Aug 2017 14:34:13 +0300 Subject: makepnd-v2 --- scripts/makepkg.sh.in | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) 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" -- cgit v1.2.3