]> Sergey Matveev's repositories - zk.git/commitdiff
Ability to print missing links
authorSergey Matveev <stargrave@stargrave.org>
Thu, 8 May 2025 14:29:11 +0000 (17:29 +0300)
committerSergey Matveev <stargrave@stargrave.org>
Thu, 8 May 2025 15:05:15 +0000 (18:05 +0300)
zk

diff --git a/zk b/zk
index de3dd4594ca51d3da7ffb37d4e6a4cf7fe9f7391..d8e8ba7fca310c0150e8d79ca17399a22657c61a 100755 (executable)
--- a/zk
+++ b/zk
@@ -205,9 +205,15 @@ for my $pth (keys %mtimes) {
             $w = $1;
             if ($w =~ /\/$/) {
                 my $w = substr $w, 0, -1;
-                next unless exists $cats{$w};
+                if (not exists $cats{$w}) {
+                    print "missing $w\n" if exists $ENV{ZK_PRINT_MISSING};
+                    next;
+                }
             } else {
-                next unless exists $mtimes{$w};
+                if (not exists $mtimes{$w}) {
+                    print "missing $w\n" if exists $ENV{ZK_PRINT_MISSING};
+                    next;
+                }
             }
             $found{$w} = 1;
         }