From 14e7427508d4eba522125bb415b18139e68b120a Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Mon, 7 Mar 2011 13:32:14 +0100 Subject: [PATCH] add macosx support to explorer/os Signed-off-by: Nico Schottelius --- conf/explorer/os | 36 +++++++++++++++++++++++++++++------- 1 file changed, 29 insertions(+), 7 deletions(-) diff --git a/conf/explorer/os b/conf/explorer/os index ce2d9c80..45b72a68 100755 --- a/conf/explorer/os +++ b/conf/explorer/os @@ -28,15 +28,37 @@ if grep -q ^DISTRIB_ID=Ubuntu /etc/lsb-release 2>/dev/null; then exit 0 fi -[ -f /etc/arch-release ] && echo archlinux +if [ -f /etc/arch-release ]; then + echo archlinux + exit 0 +fi -[ -f /etc/debian_version ] && echo debian +if [ -f /etc/debian_version ]; then + echo debian + exit 0 +fi -[ -f /etc/gentoo-release ] && echo gentoo +if [ -f /etc/gentoo-release ]; then + echo gentoo + exit 0 +fi -[ -f /etc/redhat-release ] && echo redhat +if [ -f /etc/redhat-release ]; then + echo redhat + exit 0 +fi -[ -f /etc/SuSE-release ] && echo suse +if [ -f /etc/SuSE-release ]; then + echo suse + exit 0 +fi -# ensure correct exit, otherwise other explorer won't get started -exit 0 +case "$(uname -s)" in + Darwin) + echo macosx + exit 0 + ;; +esac + +echo "Unknown OS" >&2 +exit 1