From 27ff72530acc8c59f3c2211b2d76e0f0333bc8f9 Mon Sep 17 00:00:00 2001 From: Jan Vorlicek Date: Thu, 14 Sep 2017 16:37:04 +0200 Subject: [PATCH] Enable end to end Alpine core-setup build This change enables full end to end build of core-setup including managed code on Alpine Linux. Commit migrated from https://github.com/dotnet/core-setup/commit/c8a27076f93c3107759b8a86a02ea4f40d100b67 --- src/installer/corehost/build.sh | 13 +++++++------ src/installer/corehost/common/pal.unix.cpp | 17 ++++++++++++++--- src/installer/init-tools.sh | 11 +++++++++-- .../Native/PlatformApis.cs | 12 +++++++++--- 4 files changed, 39 insertions(+), 14 deletions(-) diff --git a/src/installer/corehost/build.sh b/src/installer/corehost/build.sh index 5b368d2..d947c4c 100755 --- a/src/installer/corehost/build.sh +++ b/src/installer/corehost/build.sh @@ -22,13 +22,14 @@ init_rid_plat() __rid_plat="" if [ -e /etc/os-release ]; then source /etc/os-release - if [[ "$ID" == "rhel" && $VERSION_ID = 7* ]]; then - __rid_plat="rhel.7" - elif [[ "$ID" == "centos" && "$VERSION_ID" = "7" ]]; then - __rid_plat="rhel.7" - else - __rid_plat="$ID.$VERSION_ID" + if [[ "$ID" == "centos" ]]; then + ID="rhel" + fi + if [[ "$ID" == "rhel" || "$ID" == "alpine" ]]; then + # remove the last version number + VERSION_ID=${VERSION_ID%.*} fi + __rid_plat="$ID.$VERSION_ID" elif [ -e /etc/redhat-release ]; then local redhatRelease=$(