pkg/arch: Use git to apply commits
Applying patches with 'patch' creates problems when renaming files and changing them later in a different change in the the same patch file, causing patch to complain that the file does not exist. So use 'git am' instead.
This commit is contained in:
parent
6c21326de8
commit
f57e4e537e
|
@ -77,13 +77,17 @@ prepare() {
|
|||
echo "-$pkgrel" > localversion.10-pkgrel
|
||||
echo "${pkgbase#linux}" > localversion.20-pkgname
|
||||
|
||||
# setup git
|
||||
git config --global user.email "surfacebot@users.noreply.github.com"
|
||||
git config --global user.name "surfacebot"
|
||||
|
||||
local src
|
||||
for src in "${source[@]}"; do
|
||||
src="${src%%::*}"
|
||||
src="${src##*/}"
|
||||
[[ $src = *.patch ]] || continue
|
||||
echo "Applying patch $src..."
|
||||
patch -Np1 < "../$src"
|
||||
git am -3 "../$src"
|
||||
done
|
||||
|
||||
echo "Setting config..."
|
||||
|
|
Loading…
Reference in a new issue