summaryrefslogtreecommitdiff
path: root/build.sh
diff options
context:
space:
mode:
authorMatt Ellis <matell@microsoft.com>2016-05-25 12:37:23 -0700
committerMatt Ellis <matell@microsoft.com>2016-05-26 18:50:40 -0700
commitba385ce8b44e2018579cf3a52e34c3980a82b5c4 (patch)
tree9df509d90de9c26bd810b995a229f2fe940e7653 /build.sh
parent5e40c4dbfd67fa996fb6cea9842a433b8976e1ed (diff)
downloadcoreclr-ba385ce8b44e2018579cf3a52e34c3980a82b5c4.tar.gz
coreclr-ba385ce8b44e2018579cf3a52e34c3980a82b5c4.tar.bz2
coreclr-ba385ce8b44e2018579cf3a52e34c3980a82b5c4.zip
Add Fedora, OpenSuse and Ubuntu 16.04 packages
- Add packages for Fedora 23 and OpenSuse 13.2 - Move the package authoring for Ubuntu into versioned folders - Update our selection logic for what to produce to be based on an actual RID instead of just a distro name, since that's now not enough with us building for two Ubuntu versions
Diffstat (limited to 'build.sh')
-rwxr-xr-xbuild.sh37
1 files changed, 13 insertions, 24 deletions
diff --git a/build.sh b/build.sh
index 87d01b034d..e86fc1f0ee 100755
--- a/build.sh
+++ b/build.sh
@@ -29,20 +29,15 @@ usage()
exit 1
}
-initDistroName()
+initDistroRid()
{
if [ "$__BuildOS" == "Linux" ]; then
- # Detect Distro
- if [ "$(cat /etc/*-release | grep -cim1 ubuntu)" -eq 1 ]; then
- export __DistroName=ubuntu
- elif [ "$(cat /etc/*-release | grep -cim1 centos)" -eq 1 ]; then
- export __DistroName=rhel
- elif [ "$(cat /etc/*-release | grep -cim1 rhel)" -eq 1 ]; then
- export __DistroName=rhel
- elif [ "$(cat /etc/*-release | grep -cim1 debian)" -eq 1 ]; then
- export __DistroName=debian
+ if [ ! -e /etc/os-release ]; then
+ echo "WARNING: Can not determine runtime id for current distro."
+ export __DistroRid=""
else
- export __DistroName=""
+ source /etc/os-release
+ export __DistroRid="$ID.$VERSION_ID-$__BuildArch"
fi
fi
}
@@ -216,17 +211,11 @@ isMSBuildOnNETCoreSupported()
if [ "$__BuildArch" == "x64" ]; then
if [ "$__BuildOS" == "Linux" ]; then
- if [ "$__DistroName" == "ubuntu" ]; then
- __OSVersion=$(lsb_release -rs)
- if [ "$__OSVersion" == "14.04" ]; then
- __isMSBuildOnNETCoreSupported=1
- elif [ "$(cat /etc/*-release | grep -cim1 14.04)" -eq 1 ]; then
- # Linux Mint based on Ubuntu 14.04
- __isMSBuildOnNETCoreSupported=1
- fi
- elif [ "$__DistroName" == "rhel" ]; then
+ if [ "$__DistroRid" == "ubuntu.14.04-x64" ]; then
+ __isMSBuildOnNETCoreSupported=1
+ elif [ "$__DistroRid" == "rhel.7.2-x64" ]; then
__isMSBuildOnNETCoreSupported=1
- elif [ "$__DistroName" == "debian" ]; then
+ elif [ "$__DistroRid" == "debian.8-x64" ]; then
__isMSBuildOnNETCoreSupported=1
fi
elif [ "$__BuildOS" == "OSX" ]; then
@@ -234,7 +223,7 @@ isMSBuildOnNETCoreSupported()
fi
elif [ "$__BuildArch" == "arm" ] || [ "$__BuildArch" == "arm64" ] ; then
if [ "$__BuildOS" == "Linux" ]; then
- if [ "$__DistroName" == "ubuntu" ]; then
+ if [ "$__DistroRid" == "ubuntu.14.04-x64" ]; then
__isMSBuildOnNETCoreSupported=1
fi
fi
@@ -478,7 +467,7 @@ __ClangMajorVersion=0
__ClangMinorVersion=0
__MSBuildPath=$__ProjectRoot/Tools/MSBuild.exe
__NuGetPath="$__PackagesDir/NuGet.exe"
-__DistroName=""
+__DistroRid=""
__cmakeargs=""
__OfficialBuildIdArg=
__SkipGenerateVersion=0
@@ -673,7 +662,7 @@ if [[ $__ConfigureOnly == 1 && $__SkipConfigure == 1 ]]; then
fi
# init the distro name
-initDistroName
+initDistroRid
# Set the remaining variables based upon the determined build configuration
__BinDir="$__RootBinDir/Product/$__BuildOS.$__BuildArch.$__BuildType"