Skip to content
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

Add "--limit-rate " option to curl. Download-only option not needing sudo in installinstallmacos.py #51

Closed
porteusconf opened this issue Jun 19, 2020 · 1 comment

Comments

@porteusconf
Copy link

2 really trivial feature requests

  • (1.) Add something like a --download-only option (which also implies sudo is not needed)
    If I just want to download installers, and not create a disk-image, sudo is not needed it seems. I just commented out these lines 493-495 and as non-admin/non-sudo user, all downloads proceed ok. Of course then it bombs out when it trys to create an image but that's ok cause I did not want the disk-image, just the download.
#    if os.getuid() != 0:
#        sys.exit('This command requires root (to install packages), so please '
#                 'run again with sudo or as root.')
  • (2.) Add limit-rate option passed to curl_cme
    Also, for folks like home-users with slow internet, could we add a --limit-rate option to pass to the curl_cmd which seems to slow downloads to 100k/sec in example below.
    curl_cmd = ['/usr/bin/curl', options, '--limit-rate', ' 100k', '--create-dirs',
                '-o', local_file_path]

The curl command used in installinstallmacos.py seems to be able to resume partial-downloads from where it left off. So, with the limit-rate the download of the 6+gig mojave installer could be spread-out over a few days to save bandwidth for zoom, etc.
Finally, If you want me to fork and do a request let me know, but I really don't know python at all ;-). Or maybe I should submit these feature requests to https://github.com/grahampugh/macadmin-scripts

@gregneagle
Copy link
Contributor

Neither is something I need at present so unlikely to spend any time on either any time soon. Seems like you have ways to do these for yourself for now...

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

No branches or pull requests

2 participants