Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

download_libs downloader using wget2 #7907

Open
wants to merge 21 commits into
base: master
Choose a base branch
from

Conversation

dimitre
Copy link
Member

@dimitre dimitre commented Mar 10, 2024

So all files can be downloaded faster, in parallel
if wget2 is installed locally
if not it will fallback to curl, then wget
cc @danoli3

@danoli3
Copy link
Member

danoli3 commented Mar 11, 2024 via email

@dimitre dimitre marked this pull request as ready for review March 11, 2024 04:57
@dimitre dimitre requested a review from danoli3 May 6, 2024 21:53
@dimitre dimitre mentioned this pull request May 11, 2024
4 tasks
@dimitre
Copy link
Member Author

dimitre commented May 12, 2024

I think it is finally passing tests. I've simplified the functions to invoke the downloader, so multiple files can be passed easily. wget2 and curl download faster in parallel, wget download in series.

@ofTheo
Copy link
Member

ofTheo commented May 16, 2024

@dimitre if this is good to merge - looks good to me :)

# echo " PARAMS $PARAMS"


if command -v wget2 2>/dev/null; then
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if wget2, else curl, else wget

if command -v wget2 2>/dev/null; then 
        wget2 $@ 2> /dev/null;
elif command -v curl 2>/dev/null; then 
        curl -LO --retry 20 -O -s $@; 
else 
        wget -q $@ 2> /dev/null; 
fi

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks. fixed elif
about doing that in downloader I've decided to keep it outside because downloader.sh as I've understood, you are passing one URL at a time, and I need to pass multiple URLs at once. I found even curl can accept multiple URLs.
do you think it can work on downloader.sh without breaking anything else?

scripts/msys2/buildAllExamples.sh Outdated Show resolved Hide resolved
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants