Blame subr/pkg_fetch_download.subr

Lucio Andrés Illanes Albornoz (arab, vxp) 570129
#
Lucio Andrés Illanes Albornoz e1d469
# set +o errexit -o noglob -o nounset is assumed.
Lucio Andrés Illanes Albornoz (arab, vxp) 570129
#
Lucio Andrés Illanes Albornoz (arab, vxp) 570129
Lucio Andrés Illanes Albornoz d279a9
pkg_fetch_download() {
Lucio Andrés Illanes Albornoz b63b9b
	if [ "${ARG_FETCH_FORCE:-}" != "offline" ]; then
Lucio Andrés Illanes Albornoz b63b9b
		if [ -n "${PKG_URL:-}" ]; then
Lucio Andrés Illanes Albornoz 368962
			if ! rtl_fetch_url_wget	\
Lucio Andrés Illanes Albornoz 368962
					"${PKG_URL}" "${PKG_SHA256SUM}" "${BUILD_DLCACHEDIR}"\
Lucio Andrés Illanes Albornoz 368962
					"${PKG_FNAME}" "${PKG_NAME}" "${PKG_MIRRORS:-}"; then
Lucio Andrés Illanes Albornoz b63b9b
				return 1;
Lucio Andrés Illanes Albornoz b63b9b
			fi;
Lucio Andrés Illanes Albornoz bf9edf
		fi;
Lucio Andrés Illanes Albornoz b63b9b
		if [ -n "${PKG_URLS_GIT:-}" ]; then
Lucio Andrés Illanes Albornoz 368962
			if ! rtl_fetch_urls_git	\
Lucio Andrés Illanes Albornoz 368962
					"${BUILD_DLCACHEDIR}" "${DEFAULT_GIT_ARGS}" "${PKG_BASE_DIR}"\
Lucio Andrés Illanes Albornoz 368962
					"${PKG_NAME}" "${PKG_MIRRORS_GIT:-}" ${PKG_URLS_GIT}; then
Lucio Andrés Illanes Albornoz b63b9b
				return 1;
Lucio Andrés Illanes Albornoz b63b9b
			fi;
Lucio Andrés Illanes Albornoz bf9edf
		fi;
Lucio Andrés Illanes Albornoz (arab, vxp) 570129
	fi;
Lucio Andrés Illanes Albornoz (arab, vxp) 570129
};
Lucio Andrés Illanes Albornoz (arab, vxp) 570129
Lucio Andrés Illanes Albornoz (arab, vxp) 570129
# vim:filetype=sh