Created
December 8, 2015 19:21
-
-
Save spectra/0b6dece31462f5fc2e87 to your computer and use it in GitHub Desktop.
Parallel downloading for apt-get
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
NBATCH=3 | |
NPARALLEL=5 | |
(apt-get -y --print-uris $@ | egrep -o -e "http://[^\']+" | xargs -r -l${NBATCH} -P${NPARALLEL} wget -nv -P "/var/cache/apt/archives/") && apt-get $@ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment