summaryrefslogtreecommitdiff
path: root/init-tools.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 /init-tools.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 'init-tools.sh')
-rwxr-xr-xinit-tools.sh23
1 files changed, 9 insertions, 14 deletions
diff --git a/init-tools.sh b/init-tools.sh
index 45009d4c8d..2d20cd4876 100755
--- a/init-tools.sh
+++ b/init-tools.sh
@@ -3,17 +3,12 @@
initDistroName()
{
if [ "$1" == "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=centos
- 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
}
@@ -41,7 +36,7 @@ __BUILD_TOOLS_PATH=$__PACKAGES_DIR/Microsoft.DotNet.BuildTools/$__BUILD_TOOLS_PA
__PROJECT_JSON_PATH=$__TOOLRUNTIME_DIR/$__BUILD_TOOLS_PACKAGE_VERSION
__PROJECT_JSON_FILE=$__PROJECT_JSON_PATH/project.json
__PROJECT_JSON_CONTENTS="{ \"dependencies\": { \"Microsoft.DotNet.BuildTools\": \"$__BUILD_TOOLS_PACKAGE_VERSION\" }, \"frameworks\": { \"dnxcore50\": { } } }"
-__DistroName=""
+__DistroRid=""
OSName=$(uname -s)
case $OSName in
@@ -65,12 +60,12 @@ esac
# Initialize Linux Distribution name and .NET CLI package name.
initDistroName $OS
-if [ "$__DistroName" == "centos" ]; then
+if [ "$__DistroRid" == "centos.7-x64" ]; then
__DOTNET_PKG=dotnet-dev-centos-x64
fi
-if [ "$__DistroName" == "rhel" ]; then
- __DOTNET_PKG=dotnet-dev-centos-x64
+if [ "$__DistroRid" == "rhel.7.2-x64" ]; then
+ __DOTNET_PKG=dotnet-dev-rhel-x64
fi
# Work around mac build issue