MiniDexed icon indicating copy to clipboard operation
MiniDexed copied to clipboard

Getsysex for mac

Open sergioska opened this issue 3 years ago • 5 comments

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 avatar Jul 13 '22 09:07 sergioska

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?

probonopd avatar Jul 13 '22 16:07 probonopd

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

sergioska avatar Jul 13 '22 18:07 sergioska

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.

probonopd avatar Jul 18 '22 06:07 probonopd

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 avatar Feb 28 '23 13:02 donluca

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).

donluca avatar Feb 28 '23 18:02 donluca