]> ruderich.org/simon Gitweb - config/dotfiles.git/commitdiff
lib.sh: Add support for FreeBSD to os().
authorSimon Ruderich <simon@ruderich.org>
Mon, 29 Mar 2010 00:52:29 +0000 (02:52 +0200)
committerSimon Ruderich <simon@ruderich.org>
Mon, 29 Mar 2010 00:52:29 +0000 (02:52 +0200)
lib.sh

diff --git a/lib.sh b/lib.sh
index 045af4c44afb05f8b3f3583f357d859a0a2424c3..206f9954a3841041da04e8b4417dccf497b889dc 100644 (file)
--- a/lib.sh
+++ b/lib.sh
@@ -19,6 +19,7 @@ installed() {
 # - Gentoo (gentoo)
 # - Mac OS X (darwin)
 # - Solaris/OpenSolaris (sun)
+# - FreeBSD (freebsd)
 # If an unsupported OS is used an error is printed.
 os() {
     if [ -f /etc/debian_version ]; then
@@ -29,6 +30,8 @@ os() {
         echo darwin
     elif [ x`uname` = xSunOS ]; then
         echo sun
+    elif [ x`uname` = xFreeBSD ]; then
+        echo freebsd
     else
         echo unsupported OS! >&2
         return 1