From e927881c055a270fb23092a93577c4c0c75297a0 Mon Sep 17 00:00:00 2001 From: Christopher Hall Date: Fri, 22 Oct 2010 11:09:20 +0800 Subject: [PATCH] [scripts] rebuild checksum cache if it is outdated Signed-off-by: Christopher Hall --- scripts/GenerateIndex | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/scripts/GenerateIndex b/scripts/GenerateIndex index f30dd2785..d2c89a002 100755 --- a/scripts/GenerateIndex +++ b/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))))