From: biao716.wang Date: Wed, 3 Aug 2022 06:18:01 +0000 (+0900) Subject: retry 3 times to download once failing to download X-Git-Tag: submit/trunk/20220920.063048^2~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=6c707fb723d99c774febdae2973b5b54364b4af0;p=tools%2Fbuild.git retry 3 times to download once failing to download Change-Id: Ifba958d5a69746fe44c8beb874ba93516cb5b8cc Signed-off-by: biao716.wang --- 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));