aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Ferrell <major@homeonderanged.org>2014-04-14 15:55:58 -0700
committerMark Ferrell <major@homeonderanged.org>2014-04-14 15:55:58 -0700
commit3c116bffe12e77a000304934e4676a3387d4a2e1 (patch)
tree0d10790891134370fdc0d26ed80b59fcd40d2b7a
parente1fcde4f5af9b331a3d67d84eccc932680e75d52 (diff)
Fix fetching from mirrors
-rwxr-xr-xlibexec/build-make-fetch17
1 files changed, 8 insertions, 9 deletions
diff --git a/libexec/build-make-fetch b/libexec/build-make-fetch
index 90abfb4..57f11bf 100755
--- a/libexec/build-make-fetch
+++ b/libexec/build-make-fetch
@@ -16,6 +16,13 @@ build_make_fetch()
trap build_make_fetch_cleanup 0
echo "trying: fetch ${1}"
+
+ FETCH_LOG="${BUILDER_TMPDIR}/fetch/$(build-url --archive "${1}").log"
+
+ if ! test -d "${BUILDER_TMPDIR}/fetch"; then
+ mkdir -p "${BUILDER_TMPDIR}/fetch"
+ fi
+
build_fetch_proto="$(build-url --proto "${1}")"
if ! test -x "${BUILDER_LIBDIR}/build-fetch-${build_fetch_proto}"; then
@@ -31,18 +38,10 @@ if test "${BUILDER_CALL_STACK}" = '__main__'; then
build_fetch_file="$(build-url --archive "${1}")"
for mirror in ${MIRRORS}; do
- build_fetch "${mirror}/${build_fetch_file}" && exit
+ build_make_fetch "${mirror}/${build_fetch_file}" && exit
done
- build_make_fetch "${1}"
unset build_fetch_file
- if ! test -d "${BUILDER_TMPDIR}/fetch"; then
- mkdir -p "${BUILDER_TMPDIR}/fetch"
- fi
- FETCH_LOG="${BUILDER_TMPDIR}/fetch/$(build-url --archive "${1}").log"
- rm -f "${FETCH_LOG}"
- touch "${FETCH_LOG}"
-
build_make_fetch "${@}"
fi