SD-Installer-macos_MiSTer icon indicating copy to clipboard operation
SD-Installer-macos_MiSTer copied to clipboard

LINUX: Complete todo hardcoded urls

Open sigboe opened this issue 4 years ago • 1 comments

I found a TODO in your script. Were you wanted not to not have hardcoded URLS for the downloads.

Unfortunately this adds a dependency on jq which is in the repo of all distributions. So you can decide whether or not this is a deal-breaker for you. As a condolence I have added a check if dependencies are installed. Just says which dependency is missing and exits the script.

The reason why jq is added as a new dependency is that git does not have the ability today (afaik) to get directory listings for remote repositories. But fortunate github provides a json api. I made a point to use wget and not curl to not add more than one dependency.

The way to avoid adding jq as a dependency would require crawling the web page, and do lots of sed and awk to find and sort the output. It would be very dirty code, prone to break and I would not want to partake in writing or maintaining that code :sweat_smile:

sigboe avatar Apr 12 '20 21:04 sigboe

I didn't work on the MacOS script for this or the previous PR. I don't know where my Macbook charger is for my old intel mac, but I could try to dig it out of the cellar if it is wanted to port the changes. But I dont know which day that would happen.

I dont on the top of my head know how to list USB devices in the command line in MacOS, and I dont know how to get jq installed without asking the user to install brew or macports or something exotic.

sigboe avatar Apr 12 '20 21:04 sigboe