summaryrefslogtreecommitdiff
path: root/build-packages.sh
diff options
context:
space:
mode:
authorJan Vorlicek <janvorli@microsoft.com>2017-10-23 21:03:23 (GMT)
committerGitHub <noreply@github.com>2017-10-23 21:03:23 (GMT)
commit33159233fd161877ffe37187bf06689fe0e8bea2 (patch)
treeeee10c0fd73837ab80ec3263c2f38fecfb8a4813 /build-packages.sh
parent458c90a363b22fb29f6581610d5349bf06e17971 (diff)
downloadcoreclr-33159233fd161877ffe37187bf06689fe0e8bea2.zip
coreclr-33159233fd161877ffe37187bf06689fe0e8bea2.tar.gz
coreclr-33159233fd161877ffe37187bf06689fe0e8bea2.tar.bz2
Fix RID extraction in packages and test build for Alpine (#14656)
* Fix RID extraction in packages and test build for Alpine The host RID extraction in build-packages.sh and build-test.sh was not matching the one in build.sh * Reflect feedback
Diffstat (limited to 'build-packages.sh')
-rwxr-xr-xbuild-packages.sh10
1 files changed, 9 insertions, 1 deletions
diff --git a/build-packages.sh b/build-packages.sh
index 9b92971..4821386 100755
--- a/build-packages.sh
+++ b/build-packages.sh
@@ -16,6 +16,10 @@ initHostDistroRid()
if [ "$__HostOS" == "Linux" ]; then
if [ -e /etc/os-release ]; then
source /etc/os-release
+ if [[ $ID == "alpine" ]]; then
+ # remove the last version digit
+ VERSION_ID=${VERSION_ID%.*}
+ fi
__HostDistroRid="$ID.$VERSION_ID-$__Arch"
elif [ -e /etc/redhat-release ]; then
local redhatRelease=$(</etc/redhat-release)
@@ -24,9 +28,13 @@ initHostDistroRid()
fi
fi
fi
+ if [ "$__HostOS" == "FreeBSD" ]; then
+ __freebsd_version=`sysctl -n kern.osrelease | cut -f1 -d'.'`
+ __HostDistroRid="freebsd.$__freebsd_version-$__Arch"
+ fi
if [ "$__HostDistroRid" == "" ]; then
- echo "WARNING: Can not determine runtime id for current distro."
+ echo "WARNING: Cannot determine runtime id for current distro."
fi
}