]> ruderich.org/simon Gitweb - config/dotfiles.git/commitdiff
lib.sh: Add Gentoo support to os().
authorSimon Ruderich <simon@ruderich.org>
Mon, 16 Mar 2009 15:36:25 +0000 (16:36 +0100)
committerSimon Ruderich <simon@ruderich.org>
Mon, 16 Mar 2009 15:36:25 +0000 (16:36 +0100)
lib.sh

diff --git a/lib.sh b/lib.sh
index 88b7b98a26f2ba84cf2c141191bc296dbac48ddc..c1037be6d11d9f6496164076618e9f3cc06587f8 100644 (file)
--- a/lib.sh
+++ b/lib.sh
@@ -17,11 +17,14 @@ installed() {
     which $1 | grep -E '^/' > /dev/null
 }
 
     which $1 | grep -E '^/' > /dev/null
 }
 
-# Prints the current OS. Supported are Debian (debian) and Mac OS X (darwin)
-# at the moment. If an unsupported OS is used an error is printed.
+# Prints the current OS. Supported are Debian (debian), Gentoo (gentoo) and
+# Mac OS X (darwin) at the moment. If an unsupported OS is used an error is
+# printed.
 os() {
     if [ -f /etc/debian_version ]; then
         echo debian
 os() {
     if [ -f /etc/debian_version ]; then
         echo debian
+    elif [ -f /etc/gentoo-release ]; then
+        echo gentoo
     elif [ x`uname` = xDarwin ]; then
         echo darwin
     else
     elif [ x`uname` = xDarwin ]; then
         echo darwin
     else