munki / macadmin-scripts

Scripts of possible interest to macOS admins
Other
2.32k stars 524 forks source link

[Feature request] Add aria2 support #89

Closed 1alessandro1 closed 3 years ago

1alessandro1 commented 3 years ago

Hi @gregneagle, sorry for posting it as an issue,

Your tool is very useful to download macOS installers easily using python and curl which are both shipped by default in macOS.

However, when the connection is weak or servers are overloaded, the download may fail and curl isn't able to recover a partial download.

Here's when aria2c comes into play, solving this issue for any kind of download you're doing (stream over https, or just plain download of a file)

I suggest to add an option to the .py maybe as a flag --use-aria2c, to replace curl commands with aria2c, with an alert like:

This option requires aria2c to be present in your $PATH

In order to be able to recover a partial download on unstable circumstances

Let me know your thoughts on this, as aria2c is a very useful and reliable tool for me and many of my colleagues.

gregneagle commented 3 years ago

I don't really have the time or inclination to learn "aria2c" and figure out how to integrate it with installinstallmacos.py. curl works fine for me. There's nothing stopping you from forking the tool and adding support for aria2c for your own needs, and possibly creating a Pull Request to merge the feature back into this project.

(I write many of these tools largely for my own needs and am happy to share them in case others find them useful, but I don't necessarily have the time and inclination to add features I don't need or won't use, especially if adding and maintaining them is non-trivial)

gregneagle commented 3 years ago

Closing as I will not be adding this myself.