diff options
author | Natanael Copa <ncopa@alpinelinux.org> | 2009-01-23 08:28:58 +0000 |
---|---|---|
committer | Natanael Copa <ncopa@alpinelinux.org> | 2009-01-23 08:28:58 +0000 |
commit | 1cff62daed4e7fffee83416be85798f96b9378f9 (patch) | |
tree | cdff1bf983680dd00faf7b595da2d78966390588 | |
parent | 71854c3fae75cd4e4e83ffea4533b67142a0deaa (diff) | |
download | abuild-1cff62daed4e7fffee83416be85798f96b9378f9.tar.gz abuild-1cff62daed4e7fffee83416be85798f96b9378f9.tar.bz2 abuild-1cff62daed4e7fffee83416be85798f96b9378f9.tar.xz abuild-1cff62daed4e7fffee83416be85798f96b9378f9.zip |
abuild: checksum modifies the APKBUILD directly
-rwxr-xr-x | abuild | 7 |
1 files changed, 5 insertions, 2 deletions
@@ -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() { |