summaryrefslogtreecommitdiff
path: root/support
diff options
context:
space:
mode:
authorYann E. MORIN <yann.morin.1998@free.fr>2016-07-01 11:01:19 +0200
committerPeter Korsgaard <peter@korsgaard.com>2016-07-02 19:11:14 +0200
commitec3e057f79117d851c37f19316a3b9b5e2470550 (patch)
tree374d1fdd9d4b6e05a12e43e81ee5de087486f076 /support
parentf109e7eeb53ecfa084f80899646b68fb6dff021d (diff)
core/pkg-infra: download git submodules if the package wants them
Add a new package variable that packages can set to specify that they need git submodules. Only accept this option if the download method is git, as we can not get submodules via an http download (via wget). Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr> Cc: Aleksandar Simeonov <aleksandar@barix.com> Tested-by: Matt Weber <matt@thewebers.ws> Reviewed-by: Matt Weber <matt@thewebers.ws> Tested-By: Nicolas Cavallari <nicolas.cavallari@green-communications.fr> Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
Diffstat (limited to 'support')
-rwxr-xr-xsupport/download/dl-wrapper7
1 files changed, 4 insertions, 3 deletions
diff --git a/support/download/dl-wrapper b/support/download/dl-wrapper
index ef2d87293..f944b71db 100755
--- a/support/download/dl-wrapper
+++ b/support/download/dl-wrapper
@@ -21,15 +21,16 @@ set -e
main() {
local OPT OPTARG
- local backend output hfile quiet
+ local backend output hfile recurse quiet
# Parse our options; anything after '--' is for the backend
- while getopts :hb:o:H:q OPT; do
+ while getopts :hb:o:H:rq OPT; do
case "${OPT}" in
h) help; exit 0;;
b) backend="${OPTARG}";;
o) output="${OPTARG}";;
H) hfile="${OPTARG}";;
+ r) recurse="-r";;
q) quiet="-q";;
:) error "option '%s' expects a mandatory argument\n" "${OPTARG}";;
\?) error "unknown option '%s'\n" "${OPTARG}";;
@@ -82,7 +83,7 @@ main() {
# If the backend fails, we can just remove the temporary directory to
# remove all the cruft it may have left behind. Then we just exit in
# error too.
- if ! "${OLDPWD}/support/download/${backend}" ${quiet} "${tmpf}" "${@}"; then
+ if ! "${OLDPWD}/support/download/${backend}" ${quiet} ${recurse} "${tmpf}" "${@}"; then
rm -rf "${tmpd}"
exit 1
fi