diff options
author | Jan Vorlicek <janvorli@microsoft.com> | 2017-07-31 11:51:13 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-07-31 11:51:13 +0200 |
commit | 8f812c117bd80c59978859c601a6369c0499b101 (patch) | |
tree | d52b79bcb9d2a3d4b6093841e2691a8a05ea65fd /build.sh | |
parent | 1c540c594cc55d8446086dcd979c48efa84e00a9 (diff) | |
download | coreclr-8f812c117bd80c59978859c601a6369c0499b101.tar.gz coreclr-8f812c117bd80c59978859c601a6369c0499b101.tar.bz2 coreclr-8f812c117bd80c59978859c601a6369c0499b101.zip |
Enable RHEL6 and CentOS 6 RID detection in build (#13101)
This change adds RHEL6 and CentOS 6 RID detection to build.sh.
These distros don't have the /etc/os-release file and so
we need to use another source - the /etc/redhat-release file
Diffstat (limited to 'build.sh')
-rwxr-xr-x | build.sh | 17 |
1 files changed, 12 insertions, 5 deletions
@@ -60,15 +60,22 @@ usage() initHostDistroRid() { + __HostDistroRid="" if [ "$__HostOS" == "Linux" ]; then - if [ ! -e /etc/os-release ]; then - echo "WARNING: Can not determine runtime id for current distro." - __HostDistroRid="" - else + if [ -e /etc/os-release ]; then source /etc/os-release __HostDistroRid="$ID.$VERSION_ID-$__HostArch" + elif [ -e /etc/redhat-release ]; then + local redhatRelease=$(</etc/redhat-release) + if [[ $redhatRelease == "CentOS release 6."* || $redhatRelease == "Red Hat Enterprise Linux Server release 6."* ]]; then + __HostDistroRid="rhel.6-$__HostArch" + fi fi fi + + if [ "$__HostDistroRid" == "" ]; then + echo "WARNING: Can not determine runtime id for current distro." + fi } initTargetDistroRid() @@ -391,7 +398,7 @@ isMSBuildOnNETCoreSupported() if [ "$__HostOS" == "Linux" ]; then __isMSBuildOnNETCoreSupported=1 # note: the RIDs below can use globbing patterns - UNSUPPORTED_RIDS=("debian.9-x64" "ubuntu.17.04-x64" "alpine.3.6.*-x64") + UNSUPPORTED_RIDS=("debian.9-x64" "ubuntu.17.04-x64" "alpine.3.6.*-x64" "rhel.6-x64" "") for UNSUPPORTED_RID in "${UNSUPPORTED_RIDS[@]}" do if [[ $__HostDistroRid == $UNSUPPORTED_RID ]]; then |