Skip to content

Commit 2aea90a

Browse files
committed
---
yaml --- r: 171759 b: refs/heads/beta c: 13aac00 h: refs/heads/master i: 171757: 01484cb 171755: d846b5d 171751: 46aee16 171743: 115bfb8 v: v3
1 parent 30cd86e commit 2aea90a

File tree

2 files changed

+16
-3
lines changed

2 files changed

+16
-3
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,5 +31,5 @@ refs/heads/automation-fail: 1bf06495443584539b958873e04cc2f864ab10e4
3131
refs/heads/issue-18208-method-dispatch-3-quick-reject: 2009f85b9f99dedcec4404418eda9ddba90258a2
3232
refs/heads/batch: b5571ed71a5879c0495a982506258d5d267744ed
3333
refs/heads/building: 126db549b038c84269a1e4fe46f051b2c15d6970
34-
refs/heads/beta: 590499eb3c886bf7f6b3a732816ea263f1777886
34+
refs/heads/beta: 13aac00fa26103b2028e9dc203aae8e998b43ca7
3535
refs/heads/windistfix: 7608dbad651f02e837ed05eef3d74a6662a6e928

branches/beta/src/etc/rustup.sh

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -497,15 +497,28 @@ download_package() {
497497
remote_sha256="${remote_tarball}.sha256"
498498

499499
# Check if we've already downloaded this file.
500-
if [ ! -e "${local_tarball}" ]; then
500+
if [ -e "${local_tarball}.tmp" ]; then
501+
msg "Resuming ${remote_tarball} to ${local_tarball}"
502+
503+
"${CFG_CURL}" -f -C - -o "${local_tarball}.tmp" "${remote_tarball}"
504+
if [ $? -ne 0 ]
505+
then
506+
rm -Rf "${CFG_TMP_DIR}"
507+
err "failed to download installer"
508+
fi
509+
510+
mv "${local_tarball}.tmp" "${local_tarball}"
511+
elif [ ! -e "${local_tarball}" ]; then
501512
msg "Downloading ${remote_tarball} to ${local_tarball}"
502513

503-
"${CFG_CURL}" -f -o "${local_tarball} "${remote_tarball}"
514+
"${CFG_CURL}" -f -o "${local_tarball}.tmp" "${remote_tarball}"
504515
if [ $? -ne 0 ]
505516
then
506517
rm -Rf "${CFG_TMP_DIR}"
507518
err "failed to download installer"
508519
fi
520+
521+
mv "${local_tarball}.tmp" "${local_tarball}"
509522
fi
510523

511524
verify_hash "${remote_sha256}" "${local_tarball}"

0 commit comments

Comments
 (0)