diff options
author | dylan.araps@gmail.com <dylan.araps@gmail.com> | 2019-06-29 07:02:42 +0000 |
---|---|---|
committer | dylan.araps@gmail.com <dylan.araps@gmail.com> | 2019-06-29 07:02:42 +0000 |
commit | 64a977d2eaa461b3ec583dc6dab9cf38f55ce377 (patch) | |
tree | 83176ac0baa5bdee2ba522e28547b89571951464 /kiss-new | |
parent | 7d4090b1b64e295cb409ba49c3a0f2fb797710bd (diff) | |
download | cpt-64a977d2eaa461b3ec583dc6dab9cf38f55ce377.tar.gz |
kiss-new: Ensure that each package has checksums.
FossilOrigin-Name: 72655c01aa409ceb9161a6316816f9ae3acd3baa7a7aac0dcd29ae9d3d8bbdda
Diffstat (limited to 'kiss-new')
-rwxr-xr-x | kiss-new | 26 |
1 files changed, 24 insertions, 2 deletions
@@ -151,8 +151,30 @@ pkg_sources() { } pkg_build() { - # Build packages. - : + # Build packages and turn them into packaged tarballs. This function + # also checks checksums, downloads sources and ensure all dependencies + # are installed. + + for pkg; do + # Find the package's repository files. This needs to keep + # happening as we can't store this data in any kind of data + # structure. + repo_dir=$(pkg_search "$pkg") + + # Ensure that checksums exist prior to building the package. + [ -f "$repo_dir/checksums" ] || { + log "[$pkg]: Checksums are missing." + + # Instead of dying above, log it to the terminal. Also define a + # variable so we *can* die after all checksum files have been + # checked. + no_checkums="$no_checkums$pkg " + } + done + + # Die here as packages without checksums were found above. + [ "$no_checkums" ] && + die "Run '$kiss checksum ${no_checkums% }' to generate checksums." } pkg_checksums() { |