1
0
mirror of https://github.com/krglaws/MyLFS.git synced 2025-08-06 11:12:03 +00:00

use curl instead of wget

This commit is contained in:
Kyle Glaws
2022-04-27 23:33:46 -04:00
parent d46f89782c
commit 32ffaa7f96

View File

@ -326,12 +326,12 @@ function download_pkgs {
for url in $PACKAGE_URLS
do
trap "{ cleanup_cancelled_download $url; exit }" ERR SIGINT
trap "cleanup_cancelled_download $url && exit" ERR SIGINT
$VERBOSE && echo -n "Downloading '$url'... "
if ! echo $ALREADY_DOWNLOADED | grep $(basename $url) > /dev/null
then
if ! wget --quiet --directory-prefix $PACKAGE_DIR $url
if ! curl --location --silent --output $PACKAGE_DIR/$(basename $url) $url
then
echo -e "\nERROR: Failed to download URL '$url'"
exit 1