summaryrefslogtreecommitdiffstats
path: root/scripts/libmakepkg
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/libmakepkg')
-rw-r--r--scripts/libmakepkg/util/pkgbuild.sh.in6
1 files changed, 5 insertions, 1 deletions
diff --git a/scripts/libmakepkg/util/pkgbuild.sh.in b/scripts/libmakepkg/util/pkgbuild.sh.in
index 10d154d1..3f8669ab 100644
--- a/scripts/libmakepkg/util/pkgbuild.sh.in
+++ b/scripts/libmakepkg/util/pkgbuild.sh.in
@@ -106,7 +106,11 @@ get_pkgbuild_attribute() {
local pkgname=$1 attrname=$2 isarray=$3 outputvar=$4
- printf -v "$outputvar" %s ''
+ if (( isarray )); then
+ eval "$outputvar=()"
+ else
+ printf -v "$outputvar" %s ''
+ fi
if [[ $pkgname ]]; then
extract_global_variable "$attrname" "$isarray" "$outputvar"