summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorhashworks2020-06-17 17:33:11 +0200
committerhashworks2020-06-17 17:37:42 +0200
commit86c7d66ddacff5ea9c8a2450575db31d8cb0d96c (patch)
treea359a25393ae8092b316775ca572ca37253d9750
parentfd4ce1c6aea7065b480e8bb61038274ac2febc76 (diff)
downloadaur-86c7d66ddacff5ea9c8a2450575db31d8cb0d96c.tar.gz
Add check()
-rw-r--r--PKGBUILD10
1 files changed, 10 insertions, 0 deletions
diff --git a/PKGBUILD b/PKGBUILD
index eff633b27fa3..28b7a9e263e4 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -20,6 +20,16 @@ pkgver() {
printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}
+check() {
+ cd "${_pkgname}"
+ while IFS= read -r -d '' cksum
+ do
+ # Checksum files are not properly formated, we need to fix them first
+ echo -n " ${cksum//.checksum/}" >> "${cksum}"
+ sha256sum -c "${cksum}"
+ done < <(find . -type f -name "*.checksum" -print0)
+}
+
package() {
cd "${_pkgname}"
find . -type f -name "*.checksum" -delete