Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/bin/common-functions
diff options
context:
space:
mode:
authorErich Eckner <git@eckner.net>2017-07-19 13:34:45 +0200
committerErich Eckner <git@eckner.net>2017-07-19 13:34:45 +0200
commit1a2aadf960ec2cd66a0ceb59807509f468d0e565 (patch)
tree70795ab5b4b3cdd680d37abadd1faab6b5db61d5 /bin/common-functions
parent4c4472fff7e4129294df2c18d0ab006cb2b29ee2 (diff)
bin/common-functions: also extract groups of package
Diffstat (limited to 'bin/common-functions')
-rwxr-xr-xbin/common-functions8
1 files changed, 8 insertions, 0 deletions
diff --git a/bin/common-functions b/bin/common-functions
index 5f124d3..2d2fd52 100755
--- a/bin/common-functions
+++ b/bin/common-functions
@@ -131,6 +131,7 @@ generate_package_metadata() {
if [ -e "${file_prefix}.builds" ] && \
[ -e "${file_prefix}.depends" ] && \
[ -e "${file_prefix}.needs" ] && \
+ [ -e "${file_prefix}.groups" ] && \
[ -e "${file_prefix}.packages" ]; then
return 0
fi
@@ -154,6 +155,13 @@ generate_package_metadata() {
sort -u > \
"${file_prefix}.builds"
+ # extract "groups" = groups
+ grep "$(printf '^\tgroups = ')" "${file_prefix}.SRCINFO" | \
+ cut -d= -f2 | \
+ sed 's|^\s\+||; s|[<>]$||' | \
+ sort -u > \
+ "${file_prefix}.groups"
+
# extract "packages" = pkgname
grep '^pkgname = ' "${file_prefix}.SRCINFO" | \
cut -d= -f2 | \