Gentoo Archives: gentoo-commits

From: Max Magorsch <arzano@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/gentoo-mirrorstats:master commit in: releases_mirrors/, experimental_mirrors/
Date: Tue, 28 Apr 2020 11:24:42
Message-Id: 1588072998.12797334a6b3d9e7276770aba56e2f8ac4cced3d.arzano@gentoo
1 commit: 12797334a6b3d9e7276770aba56e2f8ac4cced3d
2 Author: Max Magorsch <arzano <AT> gentoo <DOT> org>
3 AuthorDate: Tue Apr 28 11:23:18 2020 +0000
4 Commit: Max Magorsch <arzano <AT> gentoo <DOT> org>
5 CommitDate: Tue Apr 28 11:23:18 2020 +0000
6 URL: https://gitweb.gentoo.org/proj/gentoo-mirrorstats.git/commit/?id=12797334
7
8 Fix get-mirror script for releases and experimental
9
10 Signed-off-by: Max Magorsch <arzano <AT> gentoo.org>
11
12 experimental_mirrors/get-mirror-list-experimental.rb | 6 +++++-
13 releases_mirrors/get-mirror-list-releases.rb | 6 +++++-
14 2 files changed, 10 insertions(+), 2 deletions(-)
15
16 diff --git a/experimental_mirrors/get-mirror-list-experimental.rb b/experimental_mirrors/get-mirror-list-experimental.rb
17 index 0794df3..3e4bae4 100755
18 --- a/experimental_mirrors/get-mirror-list-experimental.rb
19 +++ b/experimental_mirrors/get-mirror-list-experimental.rb
20 @@ -11,7 +11,11 @@ REXML::XPath.each(x, '//*/mirrorgroup[@country]') {|el|
21 country = el.attributes['country']
22
23 el.each_element('mirror/uri/') do |mirror|
24 - puts "#{country.downcase} #{mirror[0].to_s}"
25 + if mirror[0].to_s.end_with?("/")
26 + puts "#{country.downcase} #{mirror[0].to_s}experimental/"
27 + else
28 + puts "#{country.downcase} #{mirror[0].to_s}/experimental/"
29 + end
30 end
31
32 }
33
34 diff --git a/releases_mirrors/get-mirror-list-releases.rb b/releases_mirrors/get-mirror-list-releases.rb
35 index 0794df3..bb6b14c 100755
36 --- a/releases_mirrors/get-mirror-list-releases.rb
37 +++ b/releases_mirrors/get-mirror-list-releases.rb
38 @@ -11,7 +11,11 @@ REXML::XPath.each(x, '//*/mirrorgroup[@country]') {|el|
39 country = el.attributes['country']
40
41 el.each_element('mirror/uri/') do |mirror|
42 - puts "#{country.downcase} #{mirror[0].to_s}"
43 + if mirror[0].to_s.end_with?("/")
44 + puts "#{country.downcase} #{mirror[0].to_s}releases/"
45 + else
46 + puts "#{country.downcase} #{mirror[0].to_s}/releases/"
47 + end
48 end
49
50 }