Commit e72575c2d80f3c4653c3c7d8c69b391ae4f7934e

Thomas de Grivel 2023-08-12T17:14:19

support Fedora Linux

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
diff --git a/lib/rbpkg.rb b/lib/rbpkg.rb
index f17da88..b0fb6e3 100644
--- a/lib/rbpkg.rb
+++ b/lib/rbpkg.rb
@@ -393,7 +393,11 @@ EOF
     uname = `uname`.strip
     raise "uname failed" unless $?.success?
     if uname == "Linux"
-      distrib = `uname -a | grep -io -e Debian -e gentoo -e Ubuntu | sed -e 's|gentoo|Gentoo|'`.strip
+      if File.exist?("/etc/fedora-release")
+        distrib = `cat /etc/fedora-release | cut -d \  -f 1`
+      else
+        distrib = `uname -a | grep -io -e Debian -e gentoo -e Ubuntu | sed -e 's|gentoo|Gentoo|'`.strip
+      end
       @@os_dir = "#{uname}/#{distrib}"
       @@os = "#{uname}_#{distrib}"
     else