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"
2323# hg tarball
2424JAVA_BZ2=" $BUILDDIR /tip.tar.bz2"
2525JAVA_TMP=" $BUILDDIR /jdk_tmp"
26+ TARBALL_MAX_DOWNLOADS=10
2627
2728# #
2829# # Version-specific configuration
Original file line number Diff line number Diff line change @@ -27,7 +27,22 @@ if [ ! -d "$JDKDIR" ]; then
2727
2828 # download bz2
2929 echo " [FETCH] Downloading Java tarball from Mercurial"
30+
3031 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+
3146
3247 # extract
3348 echo " [FETCH] Extracting tarball"
You can’t perform that action at this time.
0 commit comments