From f3562be2bbdcf4bd4ccf17bf453dcc23dc25c639 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lucio=20Andr=C3=A9s=20Illanes=20Albornoz=20=28arab=2C=20vx?= =?UTF-8?q?p=29?= Date: Tue, 30 May 2017 20:41:26 +0000 Subject: build.sh, etc/build.usage: adds -[46]: force IPv[46] when downloading. subr/pre_setup_env.subr: prepend -4 or -6 to ${WGET_ARGS} when -[46] was specified. --- subr/pre_setup_env.subr | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'subr') diff --git a/subr/pre_setup_env.subr b/subr/pre_setup_env.subr index b8e1faa6..d5de2772 100644 --- a/subr/pre_setup_env.subr +++ b/subr/pre_setup_env.subr @@ -11,6 +11,11 @@ pre_setup_env() { for __ in ${HOME}/midipix_build.vars ../midipix_build.vars ./vars/build.vars; do [ -e ${__} ] && . ${__}; done; + if [ ${ARG_IPV4_ONLY:-0} -eq 1 ]; then + WGET_ARGS="-4${WGET_ARGS:+ ${WGET_ARGS}}"; + elif [ ${ARG_IPV6_ONLY:-0} -eq 1 ]; then + WGET_ARGS="-6${WGET_ARGS:+ ${WGET_ARGS}}"; + fi; for __ in $(export | sed -e 's/^export //' -e 's/=.*$//'); do if ! lmatch "${CLEAR_ENV_VARS_EXCEPT}" " " "${__}"; then unset "${__}"; -- cgit v1.2.3