aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlex Legler <alex@a3li.li>2015-10-12 11:28:31 +0200
committerAlex Legler <alex@a3li.li>2015-10-12 11:28:31 +0200
commit99d78a277fd6111ecddca724388f56c77271e809 (patch)
tree973d660a3c7e8c9e18a8d6ad3cf52d83a0e4720d
parent_data/irc: Add #gentoo-proxy-maint, fix #-commits' description (diff)
downloadwww-99d78a277fd6111ecddca724388f56c77271e809.tar.gz
www-99d78a277fd6111ecddca724388f56c77271e809.tar.bz2
www-99d78a277fd6111ecddca724388f56c77271e809.zip
Support non-bz2 stages
-rw-r--r--_plugins/downloads.rb14
1 files 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