RetroArch/qb/qb.system.sh

32 lines
654 B
Bash
Raw Normal View History

2020-01-15 06:12:22 +00:00
PLATFORM_NAME="$(uname -s)"
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';;
'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
printf %s\\n "Checking operating system ... $OS ${DISTRO}"