diff options
author | Lucio Andrés Illanes Albornoz (arab, vxp) <lucio@lucioillanes.de> | 2017-05-30 20:41:26 +0000 |
---|---|---|
committer | Lucio Andrés Illanes Albornoz (arab, vxp) <lucio@lucioillanes.de> | 2017-05-30 20:41:26 +0000 |
commit | f3562be2bbdcf4bd4ccf17bf453dcc23dc25c639 (patch) | |
tree | 44fadaad9df3d8b74edb0dd98f8fdff98d7a0b5d /subr | |
parent | 205f1f226588cc0c6dcb072ec8a99f2fc019693f (diff) | |
download | midipix_build-f3562be2bbdcf4bd4ccf17bf453dcc23dc25c639.tar.bz2 midipix_build-f3562be2bbdcf4bd4ccf17bf453dcc23dc25c639.tar.xz |
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.
Diffstat (limited to 'subr')
-rw-r--r-- | subr/pre_setup_env.subr | 5 |
1 files changed, 5 insertions, 0 deletions
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 "${__}"; |