From f17608ddca299dc617595247f2ad30a73390dbd7 Mon Sep 17 00:00:00 2001 From: Christian Marangi Date: Sat, 1 Oct 2022 01:36:48 +0200 Subject: scripts/download.pl: make the download tool configurable Introduce a new option in the "Advanced configuration options" to configure a custom download tool. By declaring a string in "Use custom download tool" an user can force what command to use to download package. With the string empty the default tool used is curl, with wget as a fallback if not available. download.pl supports 3 tools officially aria2c, curl and wget. If one of the tool is used in this config, download.pl will use the default args to make use of them. If the provided string is different than aria2c, curl or wget, the command is used as is and the download url will be appended at the end of such command. While at it also tweak the tool selection logic and chose the tool only once when the script is called and move aria2c specific variables in the relevant section. Signed-off-by: Christian Marangi --- include/download.mk | 1 + 1 file changed, 1 insertion(+) (limited to 'include') diff --git a/include/download.mk b/include/download.mk index 9ff71540f7..34d31653b1 100644 --- a/include/download.mk +++ b/include/download.mk @@ -20,6 +20,7 @@ DOWNLOAD_RDEP=$(STAMP_PREPARED) $(HOST_STAMP_PREPARED) # Export options for download.pl export DOWNLOAD_CHECK_CERTIFICATE:=$(CONFIG_DOWNLOAD_CHECK_CERTIFICATE) +export DOWNLOAD_TOOL_CUSTOM:=$(CONFIG_DOWNLOAD_TOOL_CUSTOM) define dl_method_git $(if $(filter https://github.com/% git://github.com/%,$(1)),github_archive,git) -- cgit v1.2.3