From ce45871aa92e658d17fea609cd6f3376f79bfcee Mon Sep 17 00:00:00 2001 From: Erich Eckner Date: Thu, 27 Jul 2017 08:59:12 +0200 Subject: bin/common-functions: remove redundancy, make comment more precise --- bin/common-functions | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) (limited to 'bin/common-functions') diff --git a/bin/common-functions b/bin/common-functions index 08e73f2..cd2aa8d 100755 --- a/bin/common-functions +++ b/bin/common-functions @@ -148,13 +148,6 @@ generate_package_metadata() { # otherwise this just calls for trouble sed -i '/^[^=]*=\s*$/d' "${file_prefix}.SRCINFO" - # extract "builds" = provides \cup pkgname \cup groups - grep "$(printf '^\\(\tprovides\\|\tgroups\\|pkgname\\) = ')" "${file_prefix}.SRCINFO" | \ - cut -d= -f2 | \ - sed 's|^\s\+||; s|[<>]$||' | \ - sort -u > \ - "${file_prefix}.builds" - # extract "groups" = groups \cup provides grep "$(printf '^\t\\(groups\\|provides\\) = ')" "${file_prefix}.SRCINFO" | \ cut -d= -f2 | \ @@ -169,7 +162,12 @@ generate_package_metadata() { sort -u > \ "${file_prefix}.packages" - # extract "depends" = makedepends \cup checkdepends \cup depends + # extract "builds" = provides \cup pkgname \cup groups + cat "${file_prefix}.groups" "${file_prefix}.packages" | \ + sort -u > \ + "${file_prefix}.builds" + + # extract "depends" = makedepends \cup checkdepends \cup depends \cup \{ base, base-devel \} ( printf 'all_depend = %s\n' 'base' 'base-devel' sed -n "$(printf '/^pkgname = /q;/^\tdepends = /p')" "${file_prefix}.SRCINFO" -- cgit v1.2.3-70-g09d2