<% def gradient(top, mid, btm) " background: #{mid};\n" + " background: -webkit-gradient(linear, left top, left bottom, from(#{top}), to(#{btm}));\n" + " background: -moz-linear-gradient(top, #{top}, #{btm});\n" + " filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#{top}', endColorstr='#{btm}');" end %> <%= javascript_include_tag "http://static.opensuse.org/themes/bento/js/jquery.js" %>

Select Your Operating System

<% @flavors.each do |flavor| %>
<%= flavor %>

<%= flavor %>

<% end %>

Install using One Click Install

<% @data.select {|k,v| v.has_key?(:ymp)}.each do |k,v| %> <%= k.gsub('_', ' ') %> <% end %>

Add repository and install manually

<% @data.select {|k,v| v.has_key?(:repo)}.each do |k,v| %>

For <%= k.gsub('_', ' ') %> run the following as root:

<%=
    case v[:flavor]
      when 'openSUSE', 'SLE'
        "zypper addrepo #{v[:repo]}#{@prj}.repo\nzypper refresh\nzypper install #{@pkg}"
      when 'CentOS', 'Fedora', 'RHEL', 'SL'
        "cd /etc/yum/repos.d/\nwget #{v[:repo]}#{@prj}.repo\nyum update\nyum install #{@pkg}"
      when 'Debian', 'Ubuntu'
        "echo 'deb #{v[:repo]} ./' > /etc/apt/sources.list\napt-get update\napt-get install #{@pkg}"
      when 'Mageia', 'Mandriva'
        "urpmi.addmedia #{@prj} #{v[:repo]}\nurpmi.update -a\nurpmi #{@pkg}"
      else
        '?'
    end
  %>
<% end %>

Grab binary packages directly

<% @data.select {|k,v| v.has_key?(:pkg)}.each do |k,v| %> <% end %>
Packages for <%= k.gsub('_', ' ') %>: <% v[:pkg].each do |k,v| %> <%= k %> <% end %>