Skip to content

Commit

Permalink
[scripts] rebuild checksum cache if it is outdated
Browse files Browse the repository at this point in the history
Signed-off-by: Christopher Hall <hsw@openmoko.com>
  • Loading branch information
hxw committed Oct 22, 2010
1 parent 8895c17 commit e927881
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion scripts/GenerateIndex
Expand Up @@ -147,8 +147,10 @@ exec sbcl --script "$0" "$0" "$@"
(with-open-file (file-stream file-path :direction :input :element-type 'unsigned-byte)
(let ((size (file-length file-stream)))

(if (probe-file sum-path)
(if (and (probe-file sum-path) (> (file-write-date sum-path) (file-write-date file-path)))
(progn
(when *debug*
(format t " Read cached sum from: ~a~%" sum-path))
(with-open-file (sum-stream sum-path :direction :input :element-type 'base-char)
(list size (read-line sum-stream))))
(let ((sum (vector-to-hex (md5:md5sum-stream file-stream))))
Expand Down

0 comments on commit e927881

Please sign in to comment.