summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorErich Eckner <git@eckner.net>2020-02-19 14:54:35 +0100
committerErich Eckner <git@eckner.net>2020-02-19 14:54:35 +0100
commit471e2151ea5838184985a8395576d095392ea0b6 (patch)
treea61dc4ea92d2fb29e3dc1b6aa4c0d35546217f1e
parentd6754d85f509d507b7b064a1b47c750db781d017 (diff)
downloadarchlinuxewe-471e2151ea5838184985a8395576d095392ea0b6.tar.xz
archPackagesUpdate: PKGBUILDpatch should be applied in a separate function to not confuse makepkg parsing
-rwxr-xr-xarchPackagesUpdate42
1 files changed, 22 insertions, 20 deletions
diff --git a/archPackagesUpdate b/archPackagesUpdate
index 82aac38e2..f057d6a7b 100755
--- a/archPackagesUpdate
+++ b/archPackagesUpdate
@@ -487,27 +487,29 @@ if ${aufRechenknecht}; then
else
printf 'package\n'
fi \
- | sponge \
- | while read -r function; do
- sed -i '
- /^'"${function}"'() {$/,/^}$/ {
- /^}$/ {'"$(
- ls -1 "${tmpDir}/"*".PKGBUILDpatch" | \
- grep -vxF "$(
- sed '
- s,^# skip \(\S\+\)\(\s\|$\).*$,'"${tmpDir}"'/\1.PKGBUILDpatch,
- t
- d
- ' PKGBUILD
- )" | \
- sed 's/^/r /'
- )"'
- a }
- d
- }
- }
+ | sponge \
+ | while read -r function; do
+ sed -i '
+ /^'"${function}"'() {$/,/^}$/ {
+ /^}$/ i _patch_PKGBUILD
+ }
+ ' PKGBUILD
+ done
+ {
+ echo '_patch_PKGBUILD() {'
+ ls -1 "${tmpDir}/"*".PKGBUILDpatch" \
+ | grep -vxF "$(
+ sed '
+ s,^# skip \(\S\+\)\(\s\|$\).*$,'"${tmpDir}"'/\1.PKGBUILDpatch,
+ t
+ d
' PKGBUILD
- done
+ )" \
+ | xargs -r cat
+ echo ':'
+ echo '}'
+ } \
+ >> PKGBUILD
case "${arch}" in
'any'|'i486'|'i686'|'pentium4'|'x86_64')