forked from ungleich-public/cdist
add macosx support to explorer/os
Signed-off-by: Nico Schottelius <nico@kr.ethz.ch>
This commit is contained in:
parent
b08d50db79
commit
14e7427508
1 changed files with 29 additions and 7 deletions
|
@ -28,15 +28,37 @@ if grep -q ^DISTRIB_ID=Ubuntu /etc/lsb-release 2>/dev/null; then
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
[ -f /etc/arch-release ] && echo archlinux
|
if [ -f /etc/arch-release ]; then
|
||||||
|
echo archlinux
|
||||||
[ -f /etc/debian_version ] && echo debian
|
|
||||||
|
|
||||||
[ -f /etc/gentoo-release ] && echo gentoo
|
|
||||||
|
|
||||||
[ -f /etc/redhat-release ] && echo redhat
|
|
||||||
|
|
||||||
[ -f /etc/SuSE-release ] && echo suse
|
|
||||||
|
|
||||||
# ensure correct exit, otherwise other explorer won't get started
|
|
||||||
exit 0
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -f /etc/debian_version ]; then
|
||||||
|
echo debian
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -f /etc/gentoo-release ]; then
|
||||||
|
echo gentoo
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -f /etc/redhat-release ]; then
|
||||||
|
echo redhat
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -f /etc/SuSE-release ]; then
|
||||||
|
echo suse
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
case "$(uname -s)" in
|
||||||
|
Darwin)
|
||||||
|
echo macosx
|
||||||
|
exit 0
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
echo "Unknown OS" >&2
|
||||||
|
exit 1
|
||||||
|
|
Loading…
Reference in a new issue