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 wget if curl is not available #451
Conversation
On most GNU/Linux distributions wget is often preinstalled, while curl is not.
You may also want to use |
thanks! 👍 Looks good to me. If @overdodactyl gives the thumbs up I'll merge it |
But `aria2c` is not preinstalled, while `curl` and `wget` are.
Also why should you use an advanced downloader if you need to download only a simple text file?
…On 25 June 2018 19:11:48 CEST, KOLANICH ***@***.***> wrote:
LOL. You may also want using `aria2c` if it is available ;) IMHO using
multiple of very widespread downloaders is overkill, the most advanced
should be used.
--
Emanuele
Sent from my mobile, excuse my brevity.
|
1 If curl were preinstalled, there would be no such a PR I mean there is no reason to use either wget or curl since they are both installed on most of systems and selecting a one present makes the code more complex. In an ideal world there is only one ideal downloader used by everyone and supporting everything. In real world embedding the dispatching looks untidy, but abstracting it into a lib just adds a yet other dependency. |
Wget is preinstalled on most GNU/Linux distributions, while curl on Mac.
…On 25 June 2018 19:39:18 CEST, KOLANICH ***@***.***> wrote:
>But `aria2c` is not preinstalled, while `curl` and `wget` are.
1 If curl were preinstalled, there would be no such a PR
2 aria2c is a must have anyway
3 for lulz, of course
--
Emanuele
Sent from my mobile, excuse my brevity.
|
Then it makes sense, thank you for the clarification. |
Okay, I'm just gonna merge this because it doesn't look like @overdodactyl is checking his github very often. @overdodactyl if you don't like these changes, feel free to create a new PR |
Changes look great, thanks @ema-pe :) Sorry for being MIA, glad you went ahead with the merge! |
After the discussion on #447 I decided to send single pull requests improving the existent script instead of writing a new one.
This pull request add
wget
as fallback ifcurl
is not installed. Why? Becausewget
is often preinstalled on most GNU/Linux distributions, and the end user doesn't need to install a new software for keeping updated theuser.js
.If you use
wget
orcurl
the behaviour is the same, only the output can change a bit. For example with curl:And with
wget
: