File tree Expand file tree Collapse file tree 2 files changed +16
-0
lines changed Expand file tree Collapse file tree 2 files changed +16
-0
lines changed Original file line number Diff line number Diff line change @@ -23,6 +23,7 @@ CACERTFILE="$ABLDDIR/security/cacerts"
23
23
# hg tarball
24
24
JAVA_BZ2=" $BUILDDIR /tip.tar.bz2"
25
25
JAVA_TMP=" $BUILDDIR /jdk_tmp"
26
+ TARBALL_MAX_DOWNLOADS=10
26
27
27
28
# #
28
29
# # Version-specific configuration
Original file line number Diff line number Diff line change @@ -27,7 +27,22 @@ if [ ! -d "$JDKDIR" ]; then
27
27
28
28
# download bz2
29
29
echo " [FETCH] Downloading Java tarball from Mercurial"
30
+
30
31
wget -nv -N " $JAVA_REPO "
32
+ status=$?
33
+ tries=1
34
+ while [[ " $status " -ne " 0" ]]; do
35
+
36
+ if [[ " $tries " -gt " $TARBALL_MAX_DOWNLOADS " ]]; then
37
+ echo " $TARBALL_MAX_DOWNLOADS download failed, giving up." 1>&2
38
+ exit 1
39
+ fi
40
+
41
+ wget -nv -N " $JAVA_REPO "
42
+ status=$?
43
+ tries=$(( $tries + 1 ))
44
+ done
45
+
31
46
32
47
# extract
33
48
echo " [FETCH] Extracting tarball"
You can’t perform that action at this time.
0 commit comments