mirror of
https://gitlab.alpinelinux.org/alpine/abuild.git
synced 2025-02-05 22:21:39 +00:00
abuild: fix checksum update
Fix case where 1) checksum is a single line and 2) there is a variable under the checksum that should be kept. For example: sha512sum="...." keepthis="..." Previously the `keepthis` variable would have been removed. ref https://github.com/alpinelinux/abuild/pull/41
This commit is contained in:
parent
c6609b4739
commit
1cbc853155
10
abuild.in
10
abuild.in
@ -2107,9 +2107,13 @@ checksum() {
|
||||
local s files
|
||||
[ -z "$source" ] && [ -n "${md5sums}${sha256sums}${sha512sums}" ] \
|
||||
&& msg "Removing checksums from APKBUILD"
|
||||
sed -i -e '/^md5sums="/,/"\$/d; /^md5sums=''/,/''\$/d' "$APKBUILD"
|
||||
sed -i -e '/^sha512sums="/,/"\$/d; /^sha512sums=''/,/''\$/d' "$APKBUILD"
|
||||
sed -i -e '/^sha256sums="/,/"\$/d; /^sha256sums=''/,/''\$/d' "$APKBUILD"
|
||||
sed -E -i -e '/^(md5|sha[0-9]+)sums=".*[^"]$/,/"$/d' \
|
||||
-e '/^(md5|sha[0-9]+)sums=".*"$/d' \
|
||||
\
|
||||
-e "/^(md5|sha[0-9]+)sums='.*[^']\$/,/'\$/d" \
|
||||
-e "/^(md5|sha[0-9]+)sums='.*'\$/d" \
|
||||
APKBUILD
|
||||
|
||||
[ -z "$source" ] && return 0
|
||||
fetch
|
||||
for s in $source; do
|
||||
|
Loading…
Reference in New Issue
Block a user