diff options
Diffstat (limited to '_plugins/downloads.rb')
-rw-r--r-- | _plugins/downloads.rb | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/_plugins/downloads.rb b/_plugins/downloads.rb index da4596e..8222280 100644 --- a/_plugins/downloads.rb +++ b/_plugins/downloads.rb @@ -30,7 +30,18 @@ module Gentoo File.readlines(raw_arch + '/stage3.txt').each do |line| next if line.start_with? '#' - if line =~ /^(\d{8})\/(\w+\/)?stage3-(.*)-\d{8}.tar.(\S+) (\d+)$/ + if line =~ /^(\d{8}T\d{6}Z)\/(\w+\/)?stage3-(.*)-\d{8}T\d{6}Z.tar.(\S+) (\d+)$/ + date = Date.iso8601($1) + + site.data['downloads'][arch]['stage3'] ||= {} + site.data['downloads'][arch]['stage3'][$3] = { + 'name' => $3, + 'date' => date, + 'filename' => '%s/%sstage3-%s-%s.tar.%s' % [$1, $2, $3, $1, $4], + 'subdir' => $2, + 'size' => $5 + } + elsif line =~ /^(\d{8})\/(\w+\/)?stage3-(.*)-\d{8}.tar.(\S+) (\d+)$/ date = Date.parse('%s-%s-%s' % [$1[0..3], $1[4..5], $1[6..7]]) site.data['downloads'][arch]['stage3'] ||= {} |