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

Use curl instead of wget. #144

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

Conversation

rkitover
Copy link

curl now comes with windows, and will work in a default cygwin install.

Signed-off-by: Rafael Kitover [email protected]

curl now comes with windows, and will work in a default cygwin install.

Signed-off-by: Rafael Kitover <[email protected]>
Use "$0" instead of "apt-cyg" to call self, thus not requiring self in
PATH.
Pass -s to all curl commands to make output less noisy.

Signed-off-by: Rafael Kitover <[email protected]>
@equalman
Copy link

equalman commented Sep 5, 2023 via email

apt-cyg Show resolved Hide resolved
Signed-off-by: Rafael Kitover <[email protected]>
@rkitover
Copy link
Author

rkitover commented Sep 5, 2023

Added, do you want me to make any other changes?

@lhartmann
Copy link

I am not a member of the project, but please allow me to make a suggestion.

Maybe instead of hardcoding curl/wget/lynx everywhere, improve on the original wget function with fallback. I would suggest renaming it to download_file, and fine tune each command in there. Something like

download_file() {
    local FILE="$1"
    local URL="$2"
    # try curl
    # try wget
    # try lynx
    # fail
}

I would probably also make the fallbacks silent, as there is no point in warning against something that works.

@equalman
Copy link

equalman commented Sep 25, 2023 via email

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.

4 participants