Skip to content

Commit 50a5ecd

Browse files
author
Jon Ludlam
committed
Untested new type of caching behaviour
Signed-off-by: Jon Ludlam <[email protected]>
1 parent d9b629b commit 50a5ecd

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

fromcache.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ latest=${cache}/latest
1717

1818
if [ -e ${latest}/$1 ]; then
1919
rsync -a ${latest}/$1 .
20-
echo $1 >> rsynced
20+
md5sum $1 > $1.md5
2121
fi
2222

2323

tocache.sh

+1-3
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,7 @@ thiscache=${cache}/${BUILD_NUMBER}
2323

2424
mkdir -p ${thiscache}
2525

26-
isrsynced=`grep $1 rsynced || true`
27-
28-
if [ ! "x$isrsynced" = "x" ]; then
26+
if md5sum --check $1.md5 --status; then
2927
ln ${cache}/latest/$1 ${thiscache}/$1
3028
else
3129
cp --preserve $1 ${thiscache}/$1

0 commit comments

Comments
 (0)