Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 17983 | Differences between
and this patch

Collapse All | Expand All

(-)/usr/sbin/mirrorselect (-2 / +2 lines)
Lines 33-39 Link Here
33
if [ "${1}" = "-a" ] ; then	
33
if [ "${1}" = "-a" ] ; then	
34
	echo "Fetching server list from web"
34
	echo "Fetching server list from web"
35
	# nastiness, but it should work for now
35
	# nastiness, but it should work for now
36
	MIRROR_LIST=$((echo -e "GET /main/en/mirrors.xml HTTP/0.9\r\n\r\n" 1>&3 & cat 0<&3) 3<> /dev/tcp/gentoo.org/80 | \
36
	MIRROR_LIST=$(wget -O - "http://www.gentoo.org/main/en/mirrors.xml" 2>/dev/null | \
37
	(read i; while [ "$(echo $i | tr -d '\r')" != "" ]; do read i; done; cat) | \
37
	(read i; while [ "$(echo $i | tr -d '\r')" != "" ]; do read i; done; cat) | \
38
	perl -nle'print $1 if /\s{5}<a href="((htt|ft)p[^"]+)/' | grep -v "MIRRORS")
38
	perl -nle'print $1 if /\s{5}<a href="((htt|ft)p[^"]+)/' | grep -v "MIRRORS")
39
39
Lines 42-48 Link Here
42
		CHECKLIST="${CHECKLIST} `echo $i | grep -v "("`"
42
		CHECKLIST="${CHECKLIST} `echo $i | grep -v "("`"
43
	done
43
	done
44
44
45
	if [ "`echo ${2} | grep -e "^-s[01234567890]"`" ] ; then
45
	if [ "`echo ${2} | grep -e "^-s[0-9]"`" ] ; then
46
		SERVERS="${2}"
46
		SERVERS="${2}"
47
	else
47
	else
48
		if [ "${2}" ] ; then
48
		if [ "${2}" ] ; then

Return to bug 17983