aboutsummaryrefslogtreecommitdiff
path: root/src/cpt-checksum
diff options
context:
space:
mode:
Diffstat (limited to 'src/cpt-checksum')
-rwxr-xr-xsrc/cpt-checksum9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/cpt-checksum b/src/cpt-checksum
index 5c6de52..619aad2 100755
--- a/src/cpt-checksum
+++ b/src/cpt-checksum
@@ -13,10 +13,15 @@ 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.
+ repo_dir=$(pkg_find "$pkg")
+ [ -s "$repo_dir/sources" ] || {
+ log "$pkg" "No 'sources' file, skipping checksums"
+ continue
+ }
pkg_checksums "$pkg" | {
- repo_dir=$(pkg_find "$pkg")
if [ -w "$repo_dir" ]; then
tee "$repo_dir/checksums"