Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/package.inc.sh
diff options
context:
space:
mode:
authorErick Cafferata <erick@cafferata.me>2019-01-31 14:39:32 -0500
committerErick Cafferata <erick@cafferata.me>2019-01-31 14:59:06 -0500
commit23e50952efdc355fa3583baaef6accaf34efd0b6 (patch)
tree2521a899c9c20c0ef177388ab8b31ce4d1dc08a0 /package.inc.sh
parent8f9432ff83f64399f756260dc6d579d7af78ab96 (diff)
replace sed oneliner with awk
Upstream asp depends only on awk for string manipulation. asp32 added a sed oneliner for inplace substitution (from builder repo). To avoid having to add an extra dependency for asp32, let's replace it with an awk equivalent.
Diffstat (limited to 'package.inc.sh')
-rw-r--r--package.inc.sh8
1 files changed, 2 insertions, 6 deletions
diff --git a/package.inc.sh b/package.inc.sh
index 1f9f824..2d7ead2 100644
--- a/package.inc.sh
+++ b/package.inc.sh
@@ -132,12 +132,8 @@ package_patch_arch32() {
read -r repo arch < <(package_get_repos_with_arch "$pkgname" "$remote" \
| awk '!/testing/ && (/x86_64/ || /any/) {print $1" "$2; exit}')
subtree=${1:-repos/${repo}-${arch}}
- # borrowed from archlinux32/builder/lib/common-functions' mangle_pkgbuild()
- sed -i '
- /^arch=[^#]*any/!{
- /^arch=(/s/(/(i486 i686 pentium3 /
- }
- ' "$pkgname/${subtree}/PKGBUILD"
+ awk -i inplace '!/^arch=[^#]*any/ {gsub(/^arch=\(/,"arch=(i486 i686 pentium3 ")}; {print}' \
+ "$pkgname/${subtree}/PKGBUILD"
for line in $(git ls-tree -r --name-only remotes/packages32/master ${repo}/${pkgname}); do
if [[ "${line##*/}" = "PKGBUILD" ]]; then
git show remotes/packages32/master:${line} >> ${pkgname}/${subtree}/PKGBUILD