aboutsummaryrefslogtreecommitdiff
path: root/src/cpt-checksum
diff options
context:
space:
mode:
authormerakor <cem@ckyln.com>2021-07-30 13:14:50 +0000
committermerakor <cem@ckyln.com>2021-07-30 13:14:50 +0000
commitd211a3138e947fe3a18e07144bce1de73317eae7 (patch)
treedf092b20ca35c0ee86368a80bf5ddb68aca9868e /src/cpt-checksum
parent1292c8b60ae134f6fcd5074ac0cebfba92fa6e2a (diff)
parent8e4ac4c3a6ea04c46e3c92604c0234ae803e42a7 (diff)
downloadcpt-d211a3138e947fe3a18e07144bce1de73317eae7.tar.gz
merge blake3 branch
FossilOrigin-Name: 22398ad65618c7e49b029f6d1ebb31e1269412c26f88e038d023e49f2010e6d7
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"