mirror of
https://github.com/crosstool-ng/crosstool-ng.git
synced 2025-01-18 18:56:31 +00:00
scripts/functions: simplify wget vs. curl check
This commit is contained in:
parent
d691923e88
commit
2c077d6fac
@ -353,11 +353,13 @@ _curl=$(CT_Which curl)
|
||||
# Wrapper function to call one of curl or wget
|
||||
# Usage: CT_DoGetFile <URL>
|
||||
CT_DoGetFile() {
|
||||
case "${_wget},${_curl}" in
|
||||
,) CT_Abort "Could find neither wget nor curl";;
|
||||
,*) CT_DoGetFileCurl "$1";;
|
||||
*) CT_DoGetFileWget "$1";;
|
||||
esac
|
||||
if [ -n "${_curl}" ]; then
|
||||
CT_DoGetFileCurl "$1"
|
||||
elif [ -n "${_wget}" ]; then
|
||||
CT_DoGetFileWget "$1"
|
||||
else
|
||||
CT_Abort "Could find neither wget nor curl"
|
||||
fi
|
||||
}
|
||||
|
||||
# This function tries to retrieve a tarball form a local directory
|
||||
|
Loading…
Reference in New Issue
Block a user