diff options
-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 |