Skip to content

Commit

Permalink
Add sane Fedora detection
Browse files Browse the repository at this point in the history
  • Loading branch information
Qalthos committed Apr 25, 2012
1 parent 2fa8333 commit 69248aa
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions distro_check.sh
@@ -1,13 +1,17 @@
#!/bin/bash

if [ -e "/etc/gentoo-release" ]
if [ -e "/etc/redhat-release" ]
then
# Assume RH is Fedora-compatible
echo "Fedora"
elif [ -e "/etc/gentoo-release" ]
then
echo "Gentoo"

else
lsb=$(lsb_release -si)
case $lsb in
Ubuntu)
Ubuntu | Fedora)
echo $lsb
;;
*)
Expand All @@ -19,9 +23,6 @@ else
*-amd64 | *-686-pae)
echo "Debian"
;;
*x86_64)
echo "Fedora"
;;
*)
echo $uname
;;
Expand Down

0 comments on commit 69248aa

Please sign in to comment.