Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

[scripts] rebuild checksum cache if it is outdated

Signed-off-by: Christopher Hall <hsw@openmoko.com>
  • Loading branch information...
commit e927881c055a270fb23092a93577c4c0c75297a0 1 parent 8895c17
@hxw hxw authored
Showing with 3 additions and 1 deletion.
  1. +3 −1 scripts/GenerateIndex
View
4 scripts/GenerateIndex
@@ -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))))
Please sign in to comment.
Something went wrong with that request. Please try again.