File tree 1 file changed +15
-2
lines changed
1 file changed +15
-2
lines changed Original file line number Diff line number Diff line change @@ -497,15 +497,28 @@ download_package() {
497
497
remote_sha256=" ${remote_tarball} .sha256"
498
498
499
499
# 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
501
512
msg " Downloading ${remote_tarball} to ${local_tarball} "
502
513
503
- " ${CFG_CURL} " -f -o " ${local_tarball} " ${remote_tarball} "
514
+ " ${CFG_CURL} " -f -o " ${local_tarball} .tmp " " ${remote_tarball} "
504
515
if [ $? -ne 0 ]
505
516
then
506
517
rm -Rf " ${CFG_TMP_DIR} "
507
518
err " failed to download installer"
508
519
fi
520
+
521
+ mv " ${local_tarball} .tmp" " ${local_tarball} "
509
522
fi
510
523
511
524
verify_hash " ${remote_sha256} " " ${local_tarball} "
You can’t perform that action at this time.
0 commit comments