-
-
Save mskf3000/a98e859477685f2a5ac8264236d926e7 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