diff options
author | Alex Legler <alex@a3li.li> | 2016-01-31 01:49:48 +0100 |
---|---|---|
committer | Alex Legler <alex@a3li.li> | 2016-01-31 01:49:48 +0100 |
commit | 213108f9e46766379a262747723072f9021c622c (patch) | |
tree | 3a588d06b58efbddc304be28b6ca55e8e0399b11 /_plugins/downloads.rb | |
parent | Cleanup downloads (diff) | |
download | www-213108f9e46766379a262747723072f9021c622c.tar.gz www-213108f9e46766379a262747723072f9021c622c.tar.bz2 www-213108f9e46766379a262747723072f9021c622c.zip |
Adapt downloads to arches who need to do their own thing
*sigh*
Diffstat (limited to '_plugins/downloads.rb')
-rw-r--r-- | _plugins/downloads.rb | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/_plugins/downloads.rb b/_plugins/downloads.rb index 42c7fb2..22d58e2 100644 --- a/_plugins/downloads.rb +++ b/_plugins/downloads.rb @@ -16,7 +16,14 @@ module Gentoo if line =~ /^(\d{8})\/(\S+) (\d+)$/ date = Date.parse('%s-%s-%s' % [$1[0..3], $1[4..5], $1[6..7]]) site.data['downloads'][arch]['iso'] ||= {} - site.data['downloads'][arch]['iso']['minimal'] = { 'date' => date, 'filename' => "%s/%s" % [$1, $2], 'size' => $3 } + + if $2.include? 'minimal' + site.data['downloads'][arch]['iso']['minimal'] = { 'date' => date, 'filename' => '%s/%s' % [$1, $2], 'size' => $3 } + else + subdir, filename, size = $1, $2, $3 + iso_name = $2.gsub(/-#{$1}.*$/, '') + site.data['downloads'][arch]['iso'][iso_name] = { 'date' => date, 'filename' => '%s/%s' % [subdir, filename], 'size' => size } + end end end @@ -37,6 +44,9 @@ module Gentoo end end end + + require 'pp' + pp site.data['downloads'] end end end |