]> ruderich.org/simon Gitweb - config/dotfiles.git/commitdiff
lib.sh: Add support for Solaris to os().
authorSimon Ruderich <simon@ruderich.org>
Sun, 7 Mar 2010 21:00:34 +0000 (22:00 +0100)
committerSimon Ruderich <simon@ruderich.org>
Sun, 7 Mar 2010 21:00:34 +0000 (22:00 +0100)
lib.sh

diff --git a/lib.sh b/lib.sh
index 93c45cf6645961d1d5b2de75c6cf5b3c8ea943a0..e1be32dc9d5ca45ed3a2868af8b4941674b1cc32 100644 (file)
--- a/lib.sh
+++ b/lib.sh
@@ -18,6 +18,7 @@ installed() {
 # - Debian (debian)
 # - Gentoo (gentoo)
 # - Mac OS X (darwin)
+# - Solaris/OpenSolaris (sun)
 # If an unsupported OS is used an error is printed.
 os() {
     if [ -f /etc/debian_version ]; then
@@ -26,6 +27,8 @@ os() {
         echo gentoo
     elif [ x`uname` = xDarwin ]; then
         echo darwin
+    elif [ x`uname` = xSunOS ]; then
+        echo sun
     else
         echo unsupported OS! >&2
         return 1