We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent c1a8fdb commit 6ede37dCopy full SHA for 6ede37d
2 files changed
scripts/config.sh
@@ -23,6 +23,7 @@ CACERTFILE="$ABLDDIR/security/cacerts"
23
# hg tarball
24
JAVA_BZ2="$BUILDDIR/tip.tar.bz2"
25
JAVA_TMP="$BUILDDIR/jdk_tmp"
26
+TARBALL_MAX_DOWNLOADS=10
27
28
##
29
## Version-specific configuration
scripts/fetch.sh
@@ -27,7 +27,22 @@ if [ ! -d "$JDKDIR" ]; then
# download bz2
echo "[FETCH] Downloading Java tarball from Mercurial"
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
43
+ tries=$(($tries+1))
44
+ done
45
46
47
# extract
48
echo "[FETCH] Extracting tarball"
0 commit comments