diff options
author | Lucio Andrés Illanes Albornoz <lucio@lucioillanes.de> | 2019-01-19 14:38:21 +0000 |
---|---|---|
committer | Lucio Andrés Illanes Albornoz <lucio@lucioillanes.de> | 2019-01-19 15:28:07 +0000 |
commit | d279a98da1aae886a4b4201122ce5614a185f008 (patch) | |
tree | 0800eca320fced59a554b02507cc009c555407f3 /subr/ex_rtl_fetch.subr | |
parent | e402f659b8e40a27d6ce64ea1a8f08be9f28c848 (diff) | |
download | midipix_build-d279a98da1aae886a4b4201122ce5614a185f008.tar.bz2 midipix_build-d279a98da1aae886a4b4201122ce5614a185f008.tar.xz |
etc/build.usage, subr/build_{args,checks}.subr: merges -c into -C as -C prefix.
etc/build.usage, subr/build_{args,init}.subr: merges -[46N] into -F as ipv4|ipv6|offline.
subr/ex_rtl_fetch.subr: honour ${{ARG_FETCH_FORCE,DEFAULT_GIT_ARGS}}.
subr/pkg_install_strip.subr: correctly strip non-release build binaries.
subr/pkg_install_strip.subr:pkg_install_strip(): honour ${ARG_DEBUG_MINIPIX}.
vars/env.vars, subr/pkg_fetch_{download,git,wget}.subr: merges fetch_{git,wget} into fetch_download.
vars/midipix.vars: adds ${DEFAULT_GIT_ARGS}.
vars/{musl,python[23]{,_host}}.vars: updated concerning fetch_download.
Diffstat (limited to 'subr/ex_rtl_fetch.subr')
-rw-r--r-- | subr/ex_rtl_fetch.subr | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/subr/ex_rtl_fetch.subr b/subr/ex_rtl_fetch.subr index 5b063469..2468fb6b 100644 --- a/subr/ex_rtl_fetch.subr +++ b/subr/ex_rtl_fetch.subr @@ -7,9 +7,9 @@ exp_rtl_fetch_url_git() { _oldpwd=""; if [ -e "${BUILD_DLCACHEDIR}/${_subdir}" ]; then (ex_rtl_fileop cd "${BUILD_DLCACHEDIR}/${_subdir}" &&\ - git pull origin "${_branch:-main}"); + git pull ${DEFAULT_GIT_ARGS} origin "${_branch:-main}"); else - git clone "${_url}" "${BUILD_DLCACHEDIR}/${_subdir}"; + git clone ${DEFAULT_GIT_ARGS} "${_url}" "${BUILD_DLCACHEDIR}/${_subdir}"; if [ -n "${_branch}" ]; then (ex_rtl_fileop cd "${BUILD_DLCACHEDIR}/${_subdir}" &&\ git checkout "${_branch}"); @@ -24,6 +24,9 @@ exp_rtl_fetch_url_git() { ex_rtl_fetch_urls_git() { local _tgtdir="" _url_spec="" _subdir="" _url="" _git_branch=""; _tgtdir="${1}"; shift; + if [ "${ARG_FETCH_FORCE}" = "offline" ]; then + return 0; + fi; for _url_spec in "${@}"; do _subdir="${_url_spec%=*}"; _url="${_url_spec#*=}"; @@ -39,6 +42,9 @@ ex_rtl_fetch_urls_git() { # N.B. URLs ($1) may contain `?' or '&' characters. ex_rtl_fetch_url_wget() { local _url="${1}" _sha256sum_src="${2}" _sha256sum_dst=""; + if [ "${ARG_FETCH_FORCE}" = "offline" ]; then + return 0; + fi; if [ -z "${3}" ]; then _url_dst="${BUILD_DLCACHEDIR}/$(ex_rtl_basename "${_url}")"; else |