From cbf919fb1d897e18b56535f846a63ebee1f0f8d0 Mon Sep 17 00:00:00 2001 From: Christopher Jeffrey Date: Wed, 10 Dec 2014 10:13:27 -0800 Subject: [PATCH] reorganize os precedence. --- platform/os.sh | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/platform/os.sh b/platform/os.sh index b58645af..ce55a400 100755 --- a/platform/os.sh +++ b/platform/os.sh @@ -21,22 +21,22 @@ if test -f /etc/centos-release \ os=centos elif grep -q 'Fedora' /etc/system-release; then os=fedora -elif uname -a | grep -q '^Darwin'; then - os=osx elif test -f /etc/redhat_release \ || test -f /etc/redhat-release; then os=rhel +elif uname -a | grep -q '^Darwin'; then + os=osx elif test -f /etc/SuSE-release; then os=suse elif test -f /etc/mandrake-release \ || test -f /etc/mandriva-release; then os=mandriva +elif grep -q 'Linux Mint' /etc/issue; then + os=mint elif grep -q 'Ubuntu' /etc/issue \ || grep -q 'Ubuntu' /etc/lsb-release \ || uname -v | grep -q 'Ubuntu'; then os=ubuntu -elif grep -q 'Linux Mint' /etc/issue; then - os=mint elif test -f /etc/debian_version \ || test -f /etc/debian-version; then os=debian @@ -51,7 +51,7 @@ elif test -d /system && test -d /data/data; then os=android fi -if test -z "$os" -o "$os" = 'android'; then +if test -z "$os" -o x"$os" = x'android' -o x"$os" = x'aix'; then # Maybe someday... if test "$os" = 'android' -o "$os" = 'aix'; then echo 'Android or AIX detected!' >& 2