From ca85c784acf029235757ca7e9a42e4764831fca4 Mon Sep 17 00:00:00 2001 From: Simon Ruderich Date: Mon, 16 Mar 2009 16:36:25 +0100 Subject: [PATCH] lib.sh: Add Gentoo support to os(). --- lib.sh | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/lib.sh b/lib.sh index 88b7b98..c1037be 100644 --- a/lib.sh +++ b/lib.sh @@ -17,11 +17,14 @@ installed() { 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 + elif [ -f /etc/gentoo-release ]; then + echo gentoo elif [ x`uname` = xDarwin ]; then echo darwin else -- 2.45.2