(defun shasums (dir) (with-stream (chks (open-file `@dir/CHECKSUMS` "w")) (put-line "File SHA256 sums:\n" chks) (each ((name (glob `@dir/*`))) (when (nequal (base-name name) "CHECKSUMS") (with-stream (s256 (open-file name "r")) (format chks "~x ~a\n" (uint-buf (sha256-stream s256))) (base-name name))))))