mirror of
https://gitlab.alpinelinux.org/alpine/abuild.git
synced 2025-02-20 21:46:57 +00:00
abuild: checksum modifies the APKBUILD directly
This commit is contained in:
parent
71854c3fae
commit
1cff62daed
7
abuild
7
abuild
@ -94,7 +94,7 @@ md5check() {
|
||||
return 0
|
||||
fi
|
||||
if [ -z "$md5sums" ]; then
|
||||
die "Use 'abuild checksum >>$APKBUILD' to generate a checksum"
|
||||
die "Use 'abuild checksum' to generate/update the checksum(s)"
|
||||
fi
|
||||
|
||||
if [ "$(echo $source | wc -l)" -ne "$(echo $md5sums | wc -l)" ]; then
|
||||
@ -494,14 +494,17 @@ builddeps() {
|
||||
done
|
||||
}
|
||||
|
||||
# replace the md5sums in the APKBUILD
|
||||
checksum() {
|
||||
local s files
|
||||
fetch
|
||||
msg "Updating the md5sums in APKBUILD..."
|
||||
for s in $source; do
|
||||
files="$files ${s##*/}"
|
||||
done
|
||||
md5sums="$(cd "$srcdir" && md5sum $files)" || die "md5sum failed"
|
||||
echo "md5sums=\"$md5sums\""
|
||||
sed -i -e '/^md5sums="/,/"\$/d; /^md5sums=''/,/''\$/d' "$APKBUILD"
|
||||
echo "md5sums=\"$md5sums\"" >>"$APKBUILD"
|
||||
}
|
||||
|
||||
stripbin() {
|
||||
|
Loading…
Reference in New Issue
Block a user