From 39b4472a5fcf75a9408cf9a015aa676b5caa8f05 Mon Sep 17 00:00:00 2001 From: David Kale Date: Thu, 7 Nov 2019 13:27:08 -0500 Subject: [PATCH] Preserve CURRENT_PLATFORM in dev.sh --- src/dev.sh | 67 ++++++++++++++++++++++++++---------------------------- 1 file changed, 32 insertions(+), 35 deletions(-) diff --git a/src/dev.sh b/src/dev.sh index 2000e6250..82a9c3471 100755 --- a/src/dev.sh +++ b/src/dev.sh @@ -28,43 +28,40 @@ if [[ "$DEV_CONFIG" == "Release" ]]; then BUILD_CONFIG="Release" fi -if [[ -n "$DEV_TARGET_RUNTIME" ]]; then - RUNTIME_ID="$DEV_TARGET_RUNTIME" -else - echo "Automatically determining target runtime" - CURRENT_PLATFORM="windows" - if [[ ($(uname) == "Linux") || ($(uname) == "Darwin") ]]; then - CURRENT_PLATFORM=$(uname | awk '{print tolower($0)}') - fi - - if [[ "$CURRENT_PLATFORM" == 'windows' ]]; then - RUNTIME_ID='win-x64' - if [[ "$PROCESSOR_ARCHITECTURE" == 'x86' ]]; then - RUNTIME_ID='win-x86' - fi - elif [[ "$CURRENT_PLATFORM" == 'linux' ]]; then - RUNTIME_ID="linux-x64" - if command -v uname > /dev/null; then - CPU_NAME=$(uname -m) - case $CPU_NAME in - armv7l) RUNTIME_ID="linux-arm";; - aarch64) RUNTIME_ID="linux-arm64";; - esac - fi - - if [ -e /etc/redhat-release ]; then - redhatRelease=$( /dev/null; then + CPU_NAME=$(uname -m) + case $CPU_NAME in + armv7l) RUNTIME_ID="linux-arm";; + aarch64) RUNTIME_ID="linux-arm64";; + esac +fi + +if [ -e /etc/redhat-release ]; then + redhatRelease=$(