Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/scripts/libmakepkg/util/pkgbuild.sh.in
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/libmakepkg/util/pkgbuild.sh.in')
-rw-r--r--scripts/libmakepkg/util/pkgbuild.sh.in27
1 files changed, 27 insertions, 0 deletions
diff --git a/scripts/libmakepkg/util/pkgbuild.sh.in b/scripts/libmakepkg/util/pkgbuild.sh.in
index d35c064b..2db46f1f 100644
--- a/scripts/libmakepkg/util/pkgbuild.sh.in
+++ b/scripts/libmakepkg/util/pkgbuild.sh.in
@@ -116,6 +116,33 @@ get_pkgbuild_attribute() {
fi
}
+get_pkgbuild_all_split_attributes() {
+ local attrname=$1 outputvar=$2 all_list list
+
+ if extract_global_variable "$attrname" 1 list; then
+ all_list+=("${list[@]}")
+ fi
+ for a in "${arch[@]}"; do
+ if extract_global_variable "${attrname}_$a" 1 list; then
+ all_list+=("${list[@]}")
+ fi
+ done
+
+ for name in "${pkgname[@]}"; do
+ if extract_function_variable "package_$name" "$attrname" 1 list; then
+ all_list+=("${list[@]}")
+ fi
+
+ for a in "${arch[@]}"; do
+ if extract_function_variable "package_$name" "${attrname}_$a" 1 list; then
+ all_list+=("${list[@]}")
+ fi
+ done
+ done
+
+ [[ ${all_list[@]} ]] && array_build "$outputvar" all_list
+}
+
##
# usage : get_full_version()
# return : full version spec, including epoch (if necessary), pkgver, pkgrel