File tree Expand file tree Collapse file tree 1 file changed +25
-1
lines changed
Expand file tree Collapse file tree 1 file changed +25
-1
lines changed Original file line number Diff line number Diff line change @@ -109,7 +109,31 @@ _installCommonDev() {
109109 fi
110110 if [ ${bisonInstalledVersion} != ${bisonVersion} ]; then
111111 cd " ${baseDir} "
112- eval wget https://ftp.gnu.org/gnu/bison/bison-${bisonVersion} .tar.gz
112+
113+ mirrors=(
114+ " https://ftp.gnu.org/gnu/bison"
115+ " https://ftpmirror.gnu.org/bison"
116+ " https://mirrors.kernel.org/gnu/bison"
117+ " https://mirrors.dotsrc.org/gnu/bison"
118+ )
119+
120+ success=0
121+ for mirror in " ${mirrors[@]} " ; do
122+ url=" ${mirror} /bison-${bisonVersion} .tar.gz"
123+ echo " Trying to download bison from: $url "
124+ if wget " $url " ; then
125+ success=1
126+ break
127+ else
128+ echo " Failed to download from $mirror "
129+ fi
130+ done
131+
132+ if [ $success -ne 1 ]; then
133+ echo " Error: could not download bison-${bisonVersion} .tar.gz from any mirror."
134+ exit 1
135+ fi
136+
113137 md5sum -c <( echo " ${bisonChecksum} bison-${bisonVersion} .tar.gz" ) || exit 1
114138 tar xf bison-${bisonVersion} .tar.gz
115139 cd bison-${bisonVersion}
You can’t perform that action at this time.
0 commit comments