aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rwxr-xr-xsrc/cpt-checksum7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/cpt-checksum b/src/cpt-checksum
index 5c6de52..951eb34 100755
--- a/src/cpt-checksum
+++ b/src/cpt-checksum
@@ -13,8 +13,13 @@ create_cache
for pkg; do pkg_lint "$pkg" c; done
for pkg; do pkg_sources "$pkg" c; done
-
for pkg; do
+ # Do not generate checksums if the 'sources' file is empty or it doesn't
+ # exist.
+ [ -s "$(pkg_find "$pkg")/sources" ] || {
+ log "$pkg" "No 'sources' file, skipping checksums"
+ continue
+ }
pkg_checksums "$pkg" | {
repo_dir=$(pkg_find "$pkg")