Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/sh
- DISTDIR=${1}
- FILE=${2}
- URI=${3}
- # run:
- # # emerge mirrorselect (if it's not installed)
- # # mirrorselect -s3 -b10 -o -D
- # this will select the 3 fastest mirrors, just copy them below and
- # append distfiles/ to them.
- # The final mirror (4) should be the default distfiles.gentoo.org
- # We also use the URI protage gives us to act as a fall back
- # Note, if the the file downloading is a metalink URL, it will fail.
- # ex: the Sabayon Overlay's version of XBMC fails, wget works though.
- MIRRORS[1]="foo"
- MIRRORS[2]="bar"
- MIRRORS[3]="foobar"
- MIRRORS[4]="http://distfiles.gentoo.org/distfiles/"
- /usr/bin/aria2c -d ${DISTDIR} -o ${FILE} ${URI} ${MIRRORS[1]}${FILE} ${MIRRORS[2]}${FILE} ${MIRRORS[3]}${FILE} ${MIRRORS[4]}${FILE}
Advertisement
Add Comment
Please, Sign In to add comment