summaryrefslogtreecommitdiffstats
path: root/scripts/lib/ptxd_make_world_get.sh
blob: 973afa65b3e21c3422ebb60e2f3fd47199ee1932 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#!/bin/bash
#
# Copyright (C) 2009 by Marc Kleine-Budde <mkl@pengutronix.de>
# See CREDITS for details about who has contributed to this project.
#
# For further information about the PTXdist project and license conditions
# see the README file.
#

#
# get stuff
#
ptxd_make_world_get() {
    ptxd_make_world_init &&

    case "${pkg_url}" in
	file://*)
	    if [ -n "${pkg_src}" ]; then
		ptxd_bailout "<PKG>_SOURCE must not be defined when using a file:// URL!"
	    fi
	    ;;
    esac

    if [ -n "${pkg_src}" -a \! -e "${pkg_src}" ]; then
	ptxd_make_get "${pkg_src}" "${pkg_url}"
    fi
}
export -f ptxd_make_world_get