RetroArch/qb/qb.system.sh

32 lines
654 B
Bash
Raw Normal View History

2020-01-14 22:12:22 -08:00
PLATFORM_NAME="$(uname -s)"
ARCHITECTURE_NAME="$(uname -m)"
2020-01-14 22:12:22 -08:00
2019-02-08 12:28:15 -08:00
if [ -n "${CROSS_COMPILE:=}" ]; then
2015-06-16 20:46:11 -03:00
case "$CROSS_COMPILE" in
*'-mingw32'*) OS='Win32';;
2017-01-20 18:23:45 -05:00
*'-msdosdjgpp'*) OS='DOS';;
2015-06-16 20:46:11 -03:00
*);;
esac
fi
if [ -z "$CROSS_COMPILE" ] || [ -z "$OS" ]; then
2020-01-14 22:12:22 -08:00
case "$PLATFORM_NAME" in
2015-06-16 20:46:11 -03: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 20:46:11 -03: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}"