From 6c707fb723d99c774febdae2973b5b54364b4af0 Mon Sep 17 00:00:00 2001 From: "biao716.wang" Date: Wed, 3 Aug 2022 15:18:01 +0900 Subject: [PATCH] retry 3 times to download once failing to download Change-Id: Ifba958d5a69746fe44c8beb874ba93516cb5b8cc Signed-off-by: biao716.wang --- download | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/download b/download index 9297e30..6b374d3 100755 --- a/download +++ b/download @@ -96,7 +96,7 @@ for my $url (@ARGV) { my $res = $ua->mirror($url, $dest); last if $res->is_success; # if it's a redirect we probably got a bad mirror and should just retry - die "reqesting " . hide_passwd($original) . " failed: ".$res->status_line."\n" unless $retry && $res->previous; + die "reqesting " . hide_passwd($original) . " failed: ".$res->status_line."\n" unless $retry; warn "retrying " . hide_passwd($original) . "\n"; } rename($dest, "$dir/".basename($url->path)); -- 2.34.1