Skip to content
Snippets Groups Projects
Verified Commit 5b7ba920 authored by Daniel M. Capella's avatar Daniel M. Capella
Browse files

Iterate only over patches in apply loop

parent 91c59f9a
No related branches found
No related tags found
1 merge request!11upgpkg: 6.1.0-1
......@@ -35,17 +35,22 @@ prepare() {
# revert libdepends and libprovides removal until we're ready
patch -RNp1 < ../makepkg-remove-libdepends-and-libprovides.patch
# we backport way too often in pacman
# lets at least make it more convenient
local src
src=("${source[@]/makepkg-remove-libdepends-and-libprovides.patch*}")
for src in "${src[@]}"; do
src="${src%%::*}"
src="${src##*/}"
[[ $src = *.patch ]] || continue
msg2 "Applying patch $src..."
patch -Np1 < "../$src"
done
# apply potential patches/backports
local -a patches
patches=($(printf '%s\n' "${source[@]}" | grep '.patch'))
patches=("${patches[@]%%::*}")
patches=("${patches[@]##*/}")
# WARN: adjust/remove in the future
# remove reversed patch from array
patches=("${patches[@]:1}")
if (( ${#patches[@]} != 0 )); then
for patch in "${patches[@]}"; do
msg2 "Applying patch $patch..."
patch -Np1 < "../$patch"
done
fi
}
build() {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment