File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11#! /usr/bin/env bash
22
3+ curl_with_retry ()
4+ {
5+ URL=$1
6+ echo " Fetching $URL "
7+ for (( i= 1 ;i<= 7 ;i++ )) ; do
8+ if curl -fsSLO --compressed " $URL " ; then
9+ break
10+ else
11+ echo " Curl failed with status $? . Retrying in 10 seconds..."
12+ sleep 10
13+ fi
14+ done
15+ }
16+
317set -x
418set -e
519
@@ -24,19 +38,12 @@ for key in ${gpg_keys}; do
2438done
2539
2640# Curl with retry
27- for (( i= 1 ;i<= 7 ;i++ )) ; do
28- if curl -fsSLO --compressed " $source_url " ; then
29- break
30- else
31- echo " Curl failed with status $? . Retrying in 10 seconds..."
32- sleep 10
33- fi
34- done
41+ curl_with_retry " $source_url "
3542
3643if [[ " $disttype " = " release" ]]; then
37- curl -fsSLO --compressed " ${source_urlbase} /SHASUMS256.txt.asc"
44+ curl_with_retry " ${source_urlbase} /SHASUMS256.txt.asc"
3845 gpg --batch --decrypt --output SHASUMS256.txt SHASUMS256.txt.asc
3946 grep " node-${fullversion} .tar.xz\$ " SHASUMS256.txt | sha256sum -c -
4047fi
4148
42- mv -f node-${fullversion} .tar.xz /out/
49+ mv -f node-${fullversion} .tar.xz /out/
You can’t perform that action at this time.
0 commit comments