add tertiary fallback for unavailable package files

This commit is contained in:
Tony Theodore 2012-09-16 17:49:28 +10:00
parent 2d8a490af7
commit 936a7f7b9a
1 changed files with 4 additions and 2 deletions

View File

@ -4,6 +4,7 @@
JOBS := 1
TARGET := i686-pc-mingw32
SOURCEFORGE_MIRROR := freefr.dl.sourceforge.net
PKG_MIRROR := s3.amazonaws.com/mxe-pkg
PWD := $(shell pwd)
SHELL := bash
@ -64,8 +65,9 @@ CHECK_PKG_ARCHIVE = \
DOWNLOAD_PKG_ARCHIVE = \
mkdir -p '$(PKG_DIR)' && \
$(if $($(1)_URL_2), \
( $(WGET) -T 30 -t 3 -O- '$($(1)_URL)' || $(WGET) -O- '$($(1)_URL_2)' ), \
$(WGET) -O- '$($(1)_URL)') \
( $(WGET) -T 30 -t 3 -O- '$($(1)_URL)' || $(WGET) -O- '$($(1)_URL_2)' || \
$(WGET) -O- '$(PKG_MIRROR)/$($(1)_FILE)'), \
$(WGET) -O- '$($(1)_URL)' || $(WGET) -O- '$(PKG_MIRROR)/$($(1)_FILE)') \
$(if $($(1)_FIX_GZIP), \
| gzip -d | gzip -9n, \
) \