summaryrefslogtreecommitdiffhomepage
path: root/subr/pkg_fetch.subr
blob: 705e4936aa45f9d246a393120a3f0095f7da9345 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#
# . ./build.vars and set -o errexit -o noglob are assumed.
# See warning at the top of build.vars.
#

pkg_fetch() {
	if [ "${PKG_URL_TYPE:-wget}" = wget ]; then
		fetch "${PKG_URL}" ${PKG_SHA256SUM};
	else
		fetch_git ${PKG_SUBDIR} ${PKG_URL} ${PKG_GIT_BRANCH};
	fi;
	if test_cmd pkg_${PKG_NAME}_fetch_post; then
		pkg_${PKG_NAME}_fetch_post;
	fi;
	set_build_script_done fetch -extract;
};

# vim:filetype=sh