Commit a92a3607 authored by Dave Reisner's avatar Dave Reisner Committed by Allan McRae
Browse files

makepkg: fix initialization when extracting arrays

Assuming that everything is a string leads to code which is effectively:


This creates an array with 2 elements instead of one. Using proper array
initialization fixes this.

Signed-off-by: Allan McRae's avatarAllan McRae <>
parent 5cf6f614
......@@ -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=()"
printf -v "$outputvar" %s ''
if [[ $pkgname ]]; then
extract_global_variable "$attrname" "$isarray" "$outputvar"
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment