Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/corert.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'buildscripts/build-native.sh')
-rwxr-xr-xbuildscripts/build-native.sh36
1 files changed, 36 insertions, 0 deletions
diff --git a/buildscripts/build-native.sh b/buildscripts/build-native.sh
index ab861f493..47ba3d0ec 100755
--- a/buildscripts/build-native.sh
+++ b/buildscripts/build-native.sh
@@ -76,9 +76,45 @@ build_native_corert()
popd
}
+initHostDistroRid()
+{
+ if [ "$__HostOS" == "Linux" ]; then
+ if [ ! -e /etc/os-release ]; then
+ echo "WARNING: Can not determine runtime id for current distro."
+ __HostDistroRid=""
+ else
+ source /etc/os-release
+ __HostDistroRid="$ID.$VERSION_ID-$__HostArch"
+ fi
+ fi
+}
+
+initTargetDistroRid()
+{
+ if [ $__CrossBuild == 1 ]; then
+ if [ "$__BuildOS" == "Linux" ]; then
+ if [ ! -e $ROOTFS_DIR/etc/os-release ]; then
+ echo "WARNING: Can not determine runtime id for current distro."
+ export __DistroRid=""
+ else
+ source $ROOTFS_DIR/etc/os-release
+ export __DistroRid="$ID.$VERSION_ID-$__BuildArch"
+ fi
+ fi
+ else
+ export __DistroRid="$__HostDistroRid"
+ fi
+}
+
if $__buildnative; then
+ # init the host distro name
+ initHostDistroRid
+
+ # init the target distro name
+ initTargetDistroRid
+
# Check prereqs.
check_native_prereqs