kiss: added KISS_DL to set download tool.

The command is split into words and executed as follows:

$KISS_DL <dest_file> <url>

Examples:

KISS_DL='curl -fLo' (default)
KISS_DL='wget -O'
KISS_DL='aria2c -o'
...
This commit is contained in:
Dylan Araps 2021-07-04 11:34:29 +00:00
parent 46a2bbdee0
commit a24ab03b2d
No known key found for this signature in database
GPG Key ID: 13295DAC2CF13B5C

4
kiss
View File

@ -302,7 +302,9 @@ pkg_source() {
log "$1" "Downloading $src"
mkdir -p "$PWD/$dest"
curl "$src" -fLo "$_des" || {
# Intentional behavior, globbing disabled.
# shellcheck disable=2046,2086
${KISS_DL:-curl -fLo} "$_des" "$src" || {
rm -f "$_des"
die "$1" "Failed to download $src"
}