mackal

ariawrapper-portage

Feb 3rd, 2012
117
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.78 KB | None | 0 0
  1. #!/bin/sh
  2.  
  3. DISTDIR=${1}
  4. FILE=${2}
  5. URI=${3}
  6.  
  7. # run:
  8. #     # emerge mirrorselect (if it's not installed)
  9. #     # mirrorselect -s3 -b10 -o -D
  10. #       this will select the 3 fastest mirrors, just copy them below and
  11. #       append distfiles/ to them.
  12. #       The final mirror (4) should be the default distfiles.gentoo.org
  13. #       We also use the URI protage gives us to act as a fall back
  14. #       Note, if the the file downloading is a metalink URL, it will fail.
  15. #           ex: the Sabayon Overlay's version of XBMC fails, wget works though.
  16.  
  17. MIRRORS[1]="foo"
  18. MIRRORS[2]="bar"
  19. MIRRORS[3]="foobar"
  20. MIRRORS[4]="http://distfiles.gentoo.org/distfiles/"
  21.  
  22. /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