From 1a2aadf960ec2cd66a0ceb59807509f468d0e565 Mon Sep 17 00:00:00 2001 From: Erich Eckner Date: Wed, 19 Jul 2017 13:34:45 +0200 Subject: bin/common-functions: also extract groups of package --- bin/common-functions | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'bin') 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 | \ -- cgit v1.2.3-70-g09d2