aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xkiss-new26
1 files changed, 24 insertions, 2 deletions
diff --git a/kiss-new b/kiss-new
index 69ba4c2..1fe6de0 100755
--- a/kiss-new
+++ b/kiss-new
@@ -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() {