File: gentoo_mirrors.sh

package info (click to toggle)
apt-cacher-ng 3.3.1-2~bpo10+1
  • links: PTS, VCS
  • area: main
  • in suites: buster-backports
  • size: 2,040 kB
  • sloc: cpp: 17,564; sh: 553; ansic: 401; perl: 377; makefile: 126
file content (12 lines) | stat: -rw-r--r-- 470 bytes parent folder | download | duplicates (10)
1
2
3
4
5
6
7
8
9
10
11
12
#!/bin/sh
# This fetchs the live Gentoo mirrors list
# robbat2@gentoo.org - 2013/Dec/03
OUTFILE=gentoo_mirrors
wget --save-headers -q http://www.gentoo.org/main/en/mirrors3.xml -O - \
	| ( sed -n \
	-e '/^[A-Z]/{s,^,#,g;p}' \
	-e '/<mirrorgroup/{s,^,\n#,g;p}' \
	-e '/<name/{s,^,#,g;p}' \
	-e '/<uri/{/protocol="http"/{s/.*<uri[^>]\+>//g;s/<\/uri>//g;p}}' \
  ; echo -e "\n# Default GeoDNS routed access\nhttp://distfiles.gentoo.org/" ; \
  ) | gzip -nf9 >${OUTFILE}.gz