This commit is contained in:
voidlizard 2025-05-20 10:06:27 +03:00
parent 6a04798c8e
commit c4c368f19f
1 changed files with 12 additions and 5 deletions

View File

@ -46,12 +46,19 @@
; (local (write x) (ncq:put ncq (bytes:file x))) ; (local (write x) (ncq:put ncq (bytes:file x)))
(for blocks (fn x . (for blocks (fn x .
(begin (begin
(local ha (sym (ncq:put ncq (bytes:strict:file x))))
(local h0 (sym (readhash x))) (local h0 (sym (readhash x)))
(local here (ncq:has ncq h0))
(if (not here)
(begin
(local ha (sym (ncq:put ncq (bytes:strict:file x))))
(local s (coalesce "" (ncq:has ncq ha))) (local s (coalesce "" (ncq:has ncq ha)))
(local ok (if (eq? ha h0) (ansi :green _ ok) (ansi :red _ fail))) (local ok (if (eq? ha h0) (ansi :green _ ok) (ansi :red _ fail)))
(println block space ok space (align -6 (str s)) space ha space h0 space ) (println block space ok space (align -6 (str s)) space ha space h0 space )
(if (not (eq? ha h0)) (die "*** block import error:" ha space h0)) ; (println block space ok space space ha space h0 space )
(if (not (eq? ha h0)) (die "*** block import error:" ha space h0)))
(println "block" space (ansi :yellow _ "skip") space h0)
)
))) )))
) )
) )