Compare commits
2 commits
aeae707886
...
0ca9d1c380
Author | SHA1 | Date | |
---|---|---|---|
ptrcnull | 0ca9d1c380 | ||
ptrcnull | 24a42cdb5b |
5
apatch
5
apatch
|
@ -44,7 +44,8 @@ abuild clean fetch unpack default_prepare
|
|||
startdir="$PWD"
|
||||
srcdir="$startdir/src"
|
||||
. APKBUILD
|
||||
test -n "$builddir" || builddir="$srcdir/$pkgname-$pkgver"
|
||||
unset -f grep cut head git rm mv
|
||||
[ -n "$builddir" ] || builddir="$srcdir/$pkgname-$pkgver"
|
||||
|
||||
patchpath="$startdir/$1"
|
||||
|
||||
|
@ -67,7 +68,7 @@ if [ -f "$patchpath" ]; then
|
|||
msg "patch exists, trying to extract existing message"
|
||||
# try to extract the original header from the patch
|
||||
patch_start=$(grep -En '^(diff --git|--- )' "$patchpath" | cut -d: -f1 | head -n 1)
|
||||
header_file="$(mktemp -t apatch.XXXXXX)"
|
||||
header_file="/tmp/$(mktemp -u apatch.XXXXXX)"
|
||||
head -n $(( patch_start - 1 )) "$patchpath" > "$header_file"
|
||||
fi
|
||||
|
||||
|
|
Loading…
Reference in a new issue