2020-01-15 06:12:22 +00:00
|
|
|
PLATFORM_NAME="$(uname -s)"
|
2021-01-21 05:50:35 +00:00
|
|
|
ARCHITECTURE_NAME="$(uname -m)"
|
2020-01-15 06:12:22 +00:00
|
|
|
|
2019-02-08 20:28:15 +00:00
|
|
|
if [ -n "${CROSS_COMPILE:=}" ]; then
|
2015-06-16 23:46:11 +00:00
|
|
|
case "$CROSS_COMPILE" in
|
|
|
|
*'-mingw32'*) OS='Win32';;
|
2017-01-20 23:23:45 +00:00
|
|
|
*'-msdosdjgpp'*) OS='DOS';;
|
2015-06-16 23:46:11 +00:00
|
|
|
*);;
|
|
|
|
esac
|
|
|
|
fi
|
|
|
|
|
|
|
|
if [ -z "$CROSS_COMPILE" ] || [ -z "$OS" ]; then
|
2020-01-15 06:12:22 +00:00
|
|
|
case "$PLATFORM_NAME" in
|
2015-06-16 23:46:11 +00:00
|
|
|
'Linux') OS='Linux';;
|
|
|
|
*'BSD') OS='BSD';;
|
|
|
|
'Darwin') OS='Darwin';;
|
|
|
|
'CYGWIN'*) OS='Cygwin';;
|
|
|
|
'Haiku') OS='Haiku';;
|
|
|
|
'MINGW'*) OS='Win32';;
|
2018-01-11 22:48:43 +00:00
|
|
|
'SunOS') OS='SunOS';;
|
2015-06-16 23:46:11 +00:00
|
|
|
*) OS="Win32";;
|
|
|
|
esac
|
|
|
|
fi
|
|
|
|
|
|
|
|
DISTRO=''
|
|
|
|
if [ -e /etc/lsb-release ]; then
|
|
|
|
. /etc/lsb-release
|
|
|
|
DISTRO="(${DISTRIB_DESCRIPTION} ${DISTRIB_RELEASE})"
|
|
|
|
fi
|
|
|
|
|
2019-01-20 16:08:02 +00:00
|
|
|
printf %s\\n "Checking operating system ... $OS ${DISTRO}"
|