@@ -21,7 +21,10 @@ function pull_hackage () {
21
21
# snapshot.json contains hashes of 01-index.tar.gz
22
22
# Download it first to minimize the chance of race condition
23
23
echo " Download snapshot (hashes) ..."
24
- $CURL_WRAP -sSL -o snapshot.json.bak " $HACKAGE_BASE_URL /snapshot.json" & > /dev/null
24
+ snapshot_json=(" snapshot.json" " timestamp.json" )
25
+ for json in " ${snapshot_json[@]} " ; do
26
+ $CURL_WRAP -sSL -o " $json .bak" " $HACKAGE_BASE_URL /$json " & > /dev/null
27
+ done
25
28
26
29
echo " Download latest index ..."
27
30
$CURL_WRAP -sSL -o index.tar.gz " $HACKAGE_BASE_URL /01-index.tar.gz" & > /dev/null
@@ -30,7 +33,7 @@ function pull_hackage () {
30
33
$CURL_WRAP -sSL -o index-00.tar.gz " $HACKAGE_BASE_URL /00-index.tar.gz" & > /dev/null
31
34
32
35
# download extra json files
33
- extra_json=(" mirrors.json" " root.json" " timestamp.json " )
36
+ extra_json=(" mirrors.json" " root.json" )
34
37
for json in " ${extra_json[@]} " ; do
35
38
$CURL_WRAP -sSL -o " $json " " $HACKAGE_BASE_URL /$json " & > /dev/null
36
39
done
@@ -85,6 +88,7 @@ function pull_hackage () {
85
88
cp index.tar.gz 01-index.tar.gz
86
89
mv index-00.tar.gz 00-index.tar.gz
87
90
mv snapshot.json.bak snapshot.json
91
+ mv timestamp.json.bak timestamp.json
88
92
}
89
93
90
94
function download_pkg () {
0 commit comments