lede-Heleguo/scripts
Albert Xu 6c4e5d7b47
scripts/download.pl: Make the download tool configurable (#10291)
* rules.mk: Move DOWNLOAD_CHECK_CERTIFICATE to include/download.mk

Move DOWNLOAD_CHECK_CERTIFICATE to include/download.mk as it's a better
place than exporting it in the global rules.mk makefile.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>

* 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 <ansuelsmth@gmail.com>

* scripts/download.pl: Pass aria2 config in ENV only

The aria2c command tries to load config from
${XDG_CONFIG_HOME:-${HOME}/.config}/aria2/aria2.conf by default,
which may result unexpected behavior.

As a replacement, people can use environment variable ARIA2C_OPTIONS
to custom arguments passed to aria2c like curl and wget below.
Including --conf-path=/path/to/config.conf in ARIA2C_OPTIONS can
also set a custom config file path easily if needed.

Signed-off-by: Zhang Hua <zhanghuadedn@gmail.com>

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
Signed-off-by: Zhang Hua <zhanghuadedn@gmail.com>
Co-authored-by: Christian Marangi <ansuelsmth@gmail.com>
Co-authored-by: Zhang Hua <zhanghuadedn@gmail.com>
2022-10-21 12:47:28 +08:00
..
config scripts: sync with upstream 2022-10-19 20:39:19 +08:00
flashing scripts: sync with upstream 2022-10-19 20:39:19 +08:00
arm-magic.sh
brcmImage.pl
bundle-libraries.sh add kernel 5.10 support and sync with upstream 2021-06-14 18:30:08 +08:00
cameo-imghdr.py scripts: sync with upstream 2022-10-19 20:39:19 +08:00
cameo-tag.py scripts: sync with upstream 2022-10-19 20:39:19 +08:00
cfe-bin-header.py
cfe-partition-tag.py scripts: sync with upstream 2022-10-19 20:39:19 +08:00
cfe-wfi-tag.py scripts: sync with upstream 2022-10-19 20:39:19 +08:00
check-toolchain-clean.sh scripts: sync with upstream 2022-10-19 20:39:19 +08:00
checkpatch.pl scripts: sync with upstream 2022-10-19 20:39:19 +08:00
clean-package.sh x64: fix grub2 booting 2021-06-15 17:58:07 +08:00
cleanfile
cleanpatch
combined-ext-image.sh add kernel 5.10 support and sync with upstream 2021-06-14 18:30:08 +08:00
combined-image.sh add kernel 5.10 support and sync with upstream 2021-06-14 18:30:08 +08:00
command_all.sh scripts: sync with upstream 2022-10-19 20:39:19 +08:00
config.guess add kernel 5.10 support and sync with upstream 2021-06-14 18:30:08 +08:00
config.rpath
config.sub add kernel 5.10 support and sync with upstream 2021-06-14 18:30:08 +08:00
const_structs.checkpatch add kernel 5.10 support and sync with upstream 2021-06-14 18:30:08 +08:00
deptest.sh
diffconfig.sh scripts/diffconfig.sh: ensure config/conf is built 2022-02-26 16:06:10 +00:00
dl_cleanup.py scripts: sync with upstream 2022-10-19 20:39:19 +08:00
dl_github_archive.py scripts: sync with upstream 2022-10-19 20:39:19 +08:00
download.pl scripts/download.pl: Make the download tool configurable (#10291) 2022-10-21 12:47:28 +08:00
dump-target-info.pl scripts: sync with upstream 2022-10-19 20:39:19 +08:00
env scripts: sync with upstream 2022-10-19 20:39:19 +08:00
ext-toolchain.sh scripts: sync with upstream 2022-10-19 20:39:19 +08:00
ext-tools.sh scripts: sync with upstream 2022-10-19 20:39:19 +08:00
feeds scripts: sync with upstream 2022-10-19 20:39:19 +08:00
fixup-makefile.pl
functions.sh add kernel 5.10 support and sync with upstream 2021-06-14 18:30:08 +08:00
gen_image_generic.sh scripts: sync with upstream 2022-10-19 20:39:19 +08:00
gen-dependencies.sh
get_source_date_epoch.sh add kernel 5.10 support and sync with upstream 2021-06-14 18:30:08 +08:00
getver.sh kernel: bump 5.4 to 5.4.125 2021-06-15 18:06:21 +08:00
ipkg-build scripts: sync with upstream 2022-10-19 20:39:19 +08:00
ipkg-make-index.sh add kernel 5.10 support and sync with upstream 2021-06-14 18:30:08 +08:00
ipkg-remove
json_add_image_info.py scripts: sync with upstream 2022-10-19 20:39:19 +08:00
json_overview_image_info.py scripts: sync with upstream 2022-10-19 20:39:19 +08:00
kconfig.pl add kernel 5.10 support and sync with upstream 2021-06-14 18:30:08 +08:00
linksys-image.sh scripts: sync with upstream 2022-10-19 20:39:19 +08:00
make-ipkg-dir.sh
md5sum
metadata.pm scripts: sync with upstream 2022-10-19 20:39:19 +08:00
mkhash.c scripts: sync with upstream 2022-10-19 20:39:19 +08:00
mkits-qsdk-ipq-image.sh
mkits-zyxel-fit.sh scripts: sync with upstream 2022-10-19 20:39:19 +08:00
mkits.sh scripts: sync with upstream 2022-10-19 20:39:19 +08:00
netgear-encrypted-factory.py scripts: sync with upstream 2022-10-19 20:39:19 +08:00
om-fwupgradecfg-gen.sh x64: fix grub2 booting 2021-06-15 17:58:07 +08:00
package-metadata.pl scripts: sync with upstream 2022-10-19 20:39:19 +08:00
pad_image scripts: sync with upstream 2022-10-19 20:39:19 +08:00
patch-kernel.sh
patch-specs.sh
portable_date.sh
qemustart x64: fix grub2 booting 2021-06-15 17:58:07 +08:00
redboot-script.pl
relink-lib.sh
remote-gdb
rstrip.sh scripts: sync with upstream 2022-10-19 20:39:19 +08:00
sercomm-crypto.py
sercomm-kernel-header.py scripts: sync with upstream 2022-10-19 20:39:19 +08:00
sercomm-partition-tag.py
sercomm-payload.py
sercomm-pid.py scripts: sync with upstream 2022-10-19 20:39:19 +08:00
sign_images.sh scripts: sync with upstream 2022-10-19 20:39:19 +08:00
size_compare.sh scripts: sync with upstream 2022-10-19 20:39:19 +08:00
slugimage.pl scripts: sync with upstream 2022-10-19 20:39:19 +08:00
spelling.txt add kernel 5.10 support and sync with upstream 2021-06-14 18:30:08 +08:00
srecimage.pl
strip-kmod.sh
symlink-tree.sh
sysupgrade-tar.sh
target-metadata.pl build: switch default target to x64 2022-10-19 20:42:58 +08:00
time.pl
timestamp.pl
ubinize-image.sh scripts: sync with upstream 2022-10-19 20:39:19 +08:00
xxdi.pl scripts: xxdi.pl: add xxd -i compat mode 2022-09-13 00:07:13 +08:00