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
base: master
Are you sure you want to change the base?
Conversation
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. |
@dimitre if this is good to merge - looks good to me :) |
# echo " PARAMS $PARAMS" | ||
|
||
|
||
if command -v wget2 2>/dev/null; then |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should just do this in downloader
https://github.com/openframeworks/openFrameworks/blob/master/scripts/dev/downloader.sh#L25
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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?
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