1 |
commit: 213108f9e46766379a262747723072f9021c622c |
2 |
Author: Alex Legler <alex <AT> a3li <DOT> li> |
3 |
AuthorDate: Sun Jan 31 00:49:48 2016 +0000 |
4 |
Commit: Alex Legler <a3li <AT> gentoo <DOT> org> |
5 |
CommitDate: Sun Jan 31 00:49:48 2016 +0000 |
6 |
URL: https://gitweb.gentoo.org/sites/www.git/commit/?id=213108f9 |
7 |
|
8 |
Adapt downloads to arches who need to do their own thing |
9 |
|
10 |
*sigh* |
11 |
|
12 |
_includes/downloads/experimental.html | 11 +++++++---- |
13 |
_plugins/downloads.rb | 12 +++++++++++- |
14 |
bin/update-downloads.sh | 9 ++++++++- |
15 |
3 files changed, 26 insertions(+), 6 deletions(-) |
16 |
|
17 |
diff --git a/_includes/downloads/experimental.html b/_includes/downloads/experimental.html |
18 |
index 0adc955..ca920a3 100644 |
19 |
--- a/_includes/downloads/experimental.html |
20 |
+++ b/_includes/downloads/experimental.html |
21 |
@@ -9,10 +9,13 @@ |
22 |
|
23 |
<h4 id="s390">s390</h4> |
24 |
<div class="list-group"> |
25 |
- <a href="http://distfiles.gentoo.org/releases/s390/autobuilds/" data-relurl="../releases/s390/stages/" class="list-group-item download-link download-link-mirrorable"> |
26 |
- <span class="fa fa-download fa-fw"></span> |
27 |
- <strong>S390 stages and boot media</strong> |
28 |
- </a> |
29 |
+ {% include partials/download-link.html type="iso" arch="s390" id="netboot-s390-initramfs" title="Netboot Initramfs" tag="S390" %} |
30 |
+ {% include partials/download-link.html type="iso" arch="s390" id="netboot-s390-kernel" title="Netboot Kernel" tag="S390" %} |
31 |
+ {% include partials/download-link.html type="stage3" arch="s390" id="s390" title="Stage 3" tag="S390" %} |
32 |
+ |
33 |
+ {% include partials/download-link.html type="iso" arch="s390" id="netboot-s390x-initramfs" title="Netboot Initramfs" tag="S390X" %} |
34 |
+ {% include partials/download-link.html type="iso" arch="s390" id="netboot-s390x-kernel" title="Netboot Kernel" tag="S390X" %} |
35 |
+ {% include partials/download-link.html type="stage3" arch="s390" id="s390x" title="Stage 3" tag="S390X" %} |
36 |
</div> |
37 |
|
38 |
<h4 id="sh">sh</h4> |
39 |
|
40 |
diff --git a/_plugins/downloads.rb b/_plugins/downloads.rb |
41 |
index 42c7fb2..22d58e2 100644 |
42 |
--- a/_plugins/downloads.rb |
43 |
+++ b/_plugins/downloads.rb |
44 |
@@ -16,7 +16,14 @@ module Gentoo |
45 |
if line =~ /^(\d{8})\/(\S+) (\d+)$/ |
46 |
date = Date.parse('%s-%s-%s' % [$1[0..3], $1[4..5], $1[6..7]]) |
47 |
site.data['downloads'][arch]['iso'] ||= {} |
48 |
- site.data['downloads'][arch]['iso']['minimal'] = { 'date' => date, 'filename' => "%s/%s" % [$1, $2], 'size' => $3 } |
49 |
+ |
50 |
+ if $2.include? 'minimal' |
51 |
+ site.data['downloads'][arch]['iso']['minimal'] = { 'date' => date, 'filename' => '%s/%s' % [$1, $2], 'size' => $3 } |
52 |
+ else |
53 |
+ subdir, filename, size = $1, $2, $3 |
54 |
+ iso_name = $2.gsub(/-#{$1}.*$/, '') |
55 |
+ site.data['downloads'][arch]['iso'][iso_name] = { 'date' => date, 'filename' => '%s/%s' % [subdir, filename], 'size' => size } |
56 |
+ end |
57 |
end |
58 |
end |
59 |
|
60 |
@@ -37,6 +44,9 @@ module Gentoo |
61 |
end |
62 |
end |
63 |
end |
64 |
+ |
65 |
+ require 'pp' |
66 |
+ pp site.data['downloads'] |
67 |
end |
68 |
end |
69 |
end |
70 |
|
71 |
diff --git a/bin/update-downloads.sh b/bin/update-downloads.sh |
72 |
index 9836ad7..2191f13 100755 |
73 |
--- a/bin/update-downloads.sh |
74 |
+++ b/bin/update-downloads.sh |
75 |
@@ -7,6 +7,13 @@ for arch in "${ARCHES[@]}"; do |
76 |
mkdir -p _data/downloads/${arch}/ |
77 |
wget "http://distfiles.gentoo.org/releases/${arch}/autobuilds/latest-iso.txt" -O _data/downloads/${arch}/iso.txt 2>/dev/null |
78 |
wget "http://distfiles.gentoo.org/releases/${arch}/autobuilds/latest-stage3.txt" -O _data/downloads/${arch}/stage3.txt 2>/dev/null |
79 |
+ |
80 |
+ if [ ${arch} = "s390" ]; then |
81 |
+ wget "http://distfiles.gentoo.org/releases/s390/autobuilds/latest-netboot-s390-initramfs.txt" -O - >> _data/downloads/${arch}/iso.txt 2>/dev/null |
82 |
+ wget "http://distfiles.gentoo.org/releases/s390/autobuilds/latest-netboot-s390-kernel.txt" -O - >> _data/downloads/${arch}/iso.txt 2>/dev/null |
83 |
+ wget "http://distfiles.gentoo.org/releases/s390/autobuilds/latest-netboot-s390x-initramfs.txt" -O - >> _data/downloads/${arch}/iso.txt 2>/dev/null |
84 |
+ wget "http://distfiles.gentoo.org/releases/s390/autobuilds/latest-netboot-s390x-kernel.txt" -O - >> _data/downloads/${arch}/iso.txt 2>/dev/null |
85 |
+ fi |
86 |
done |
87 |
|
88 |
-echo 'done.' |
89 |
\ No newline at end of file |
90 |
+echo 'done.' |