summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xbuild.sh17
1 files changed, 12 insertions, 5 deletions
diff --git a/build.sh b/build.sh
index 91a97e41d0..b6195921ed 100755
--- a/build.sh
+++ b/build.sh
@@ -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