From e200e8b358065e7484363b1d8bf9d5c27d3ffd55 Mon Sep 17 00:00:00 2001 From: Dylan Araps Date: Wed, 13 May 2020 22:33:22 +0300 Subject: [PATCH] kiss-chbuild: Verify checksums. Closes #152 --- contrib/kiss-chbuild | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/contrib/kiss-chbuild b/contrib/kiss-chbuild index 3bd894f..c2593c7 100755 --- a/contrib/kiss-chbuild +++ b/contrib/kiss-chbuild @@ -12,6 +12,15 @@ cd "${cac_dir:=$KISS_ROOT${XDG_CACHE_HOME:-$HOME/.cache}/kiss}" url=https://github.com/kisslinux/repo/releases/download/1.10.0/ curl -OL "$url/kiss-chroot.tar.xz" + curl -OL "$url/kiss-chroot.tar.xz.sha256" + + log "Verifying checksums" + + sha256sum -c < kiss-chroot.tar.xz.sha256 || { + rm -f kiss-chroot.tar.xz + log "Checksum verification failed." + log "Re-run 'kiss-chbuild' to try again." + } } [ -d kiss-chroot ] || {