Add a common env for platform/platform os export

This commit is contained in:
2020-07-30 11:56:04 -04:00
parent fbd5048dca
commit 12018878a4
13 changed files with 38 additions and 16 deletions

15
common_env Normal file
View File

@@ -0,0 +1,15 @@
# Common env for all shells.
uname_s="$(uname -s)"
case "${uname_s}" in
Linux*) platform="LINUX" platform_os="LINUX";;
Darwin*) platform="MACOS" platform_os="MACOS";;
CYGWIN*) platform="CYGWIN" platform_os="WINDOWS";;
MINGW*) platform="MINGW" platform_os="WINDOWS";;
MSYS*) platform="MINGW" platform_os="WINDOWS";;
*) platform="UNKNOWN:${uname_s} platform_os="UNKNOWN_OS""
esac
export PLATFORM=$platform
export PLATFORM_OS=$platform_os