commit:     99d78a277fd6111ecddca724388f56c77271e809
Author:     Alex Legler <alex <AT> a3li <DOT> li>
AuthorDate: Mon Oct 12 09:28:31 2015 +0000
Commit:     Alex Legler <a3li <AT> gentoo <DOT> org>
CommitDate: Mon Oct 12 09:28:31 2015 +0000
URL:        https://gitweb.gentoo.org/sites/www.git/commit/?id=99d78a27

Support non-bz2 stages

 _plugins/downloads.rb | 14 ++++++--------
 1 file changed, 6 insertions(+), 8 deletions(-)

diff --git a/_plugins/downloads.rb b/_plugins/downloads.rb
index 69720e3..42c7fb2 100644
--- a/_plugins/downloads.rb
+++ b/_plugins/downloads.rb
@@ -12,33 +12,31 @@ module Gentoo
         site.data['downloads'][arch] = {}
 
         File.readlines(raw_arch + '/iso.txt').each do |line|
-          #puts line
           next if line.start_with? '#'
           if line =~ /^(\d{8})\/(\S+) (\d+)$/
-            date = Date.parse("%s-%s-%s" % [$1[0..3], $1[4..5], $1[6..7]])
+            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 }
           end
         end
 
         File.readlines(raw_arch + '/stage3.txt').each do |line|
-          # puts line
           next if line.start_with? '#'
 
-          if line =~ /^(\d{8})\/(\w+\/)?stage3-(.*)-\d{8}.tar.bz2 (\d+)$/
-            date = Date.parse("%s-%s-%s" % [$1[0..3], $1[4..5], $1[6..7]])
+          if 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'] ||= {}
             site.data['downloads'][arch]['stage3'][$3] = {
               'name' => $3,
               'date' => date,
-              'filename' => "%s/%sstage3-%s-%s.tar.bz2" % [$1, $2, $3, $1],
+              'filename' => '%s/%sstage3-%s-%s.tar.%s' % [$1, $2, $3, $1, $4],
               'subdir' => $2,
-              'size' => $4
+              'size' => $5
             }
           end
         end
       end
     end
   end
-end
\ No newline at end of file
+end

Reply via email to