Skip to content

Conversation

@sergioska
Copy link

wget doesn't work on mac by default, so I have created a simple "decorator" sh command to convert wget in curl.
it works by applying a simple sed
I hope that can be useful

@sergioska sergioska changed the title getsysex for mac Getsysex for mac Jul 13, 2022
@probonopd
Copy link
Owner

Good idea, but to make it even simpler for users (needing just one script file rather than two) we could just check for the availability of the wget and curl commands and use whichever is available as the command to download the files with. Do you think you could code that?

@sergioska
Copy link
Author

Yep @probonopd, curl version should work fine both on linux and mac. let me check it and if it's so I'll convert the main getsysex.sh to use curl instead wget

@probonopd
Copy link
Owner

Not every system has curl installed, and not every system has wget installed. So we should check which one is present and use that one. Ideally all in just one script file.

@donluca
Copy link
Contributor

donluca commented Feb 28, 2023

Most Unix distributions now ship with cUrl by default, but implementing a simple check between wget and cUrl would be trivial.

When I'm done with PR #443 I'll tackle this and rewrite the script from scratch to make it more robust and reliable (and easily expandable, so people can add links they wish to include more easily).

This time I know what I'm doing, I've been scripting in bash for years ;D

@donluca
Copy link
Contributor

donluca commented Feb 28, 2023

I've created #444 to address this.

I've decided to go with cUrl only because from my research it is absolutely everywhere nowadays.

If anyone can come up with examples which are not Busybox or Yocto builds where cUrl isn't available by default I'll update the script to use wget (which, IMHO, doesn't make any sense because a system which doesn't have cUrl by default is much less likely to have wget).

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.

3 participants