Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorErich Eckner <git@eckner.net>2017-07-27 08:59:12 +0200
committerErich Eckner <git@eckner.net>2017-07-27 08:59:12 +0200
commitce45871aa92e658d17fea609cd6f3376f79bfcee (patch)
tree2d3dedbfe45ef1ae7eb687c1791d4f6023d07367 /bin
parentb9e8973df4657278873472b13a28de285f43e33a (diff)
bin/common-functions: remove redundancy, make comment more precise
Diffstat (limited to 'bin')
-rwxr-xr-xbin/common-functions14
1 files changed, 6 insertions, 8 deletions
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"