Skip to content

Commit

Permalink
Merge pull request #76 from Mailaender/fedora-dnf
Browse files Browse the repository at this point in the history
Updated repository instructions for Fedora 22+
  • Loading branch information
coolo committed Jul 18, 2016
2 parents 32fea86 + 48ff49b commit 14429fb
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion app/views/download/package.erb
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,14 @@ pacman -S <%= repo_name %>/<%= @package %></pre>
else
"zypper addrepo #{v[:repo]}#{@project}.repo\nzypper refresh\nzypper install #{@package}"
end
when 'CentOS', 'Fedora', 'RHEL', 'SL'
when 'Fedora'
version = k.split("_").last
if Integer(version) >= 22
"dnf config-manager --add-repo #{v[:repo]}#{@project}.repo\ndnf install #{@package}"
else
"cd /etc/yum.repos.d/\nwget #{v[:repo]}#{@project}.repo\nyum install #{@package}"
end
when 'CentOS', 'RHEL', 'SL'
"cd /etc/yum.repos.d/\nwget #{v[:repo]}#{@project}.repo\nyum install #{@package}"
when 'Debian', 'Univention'
"echo 'deb #{v[:repo].gsub(/(\w):(\w)/, '\1:/\2')} /' >> /etc/apt/sources.list.d/#{@package}.list \napt-get update\napt-get install #{@package}"
Expand Down

0 comments on commit 14429fb

Please sign in to comment.