curl support

This commit is contained in:
andreika-git 2022-04-08 12:17:33 +03:00
parent 12e9549c00
commit 71dc3b8396
1 changed files with 7 additions and 1 deletions

View File

@ -122,10 +122,16 @@ function wget {
if command wget -h &>/dev/null
then
command wget "$@"
else
# see https://github.com/transcode-open/apt-cyg/issues/99
elif command lynx -version &>/dev/null
then
warn wget is not installed, using lynx as fallback
set "${*: -1}"
lynx -source "$1" > "${1##*/}"
else
warn wget and lynx are not installed, using curl as fallback
set "${*/\-O/" -o"}"
command curl -L $1
fi
}