# | alpine* | linux-musl-(arch) |
# | freeBSD | freebsd.(version)-x64 |
#
-# It is important to note that the function does not return anything, but it
+# It is important to note that the function does not return anything, but it
# will set __DistroRid if there is a non-portable distro rid to be used.
#
initNonPortableDistroRid()
# has been passed as false.
if (( ${isPortable} == 0 )); then
if [ "${ID}" == "rhel" ]; then
- # remove the last version digit
+ # remove the last version digit
VERSION_ID=${VERSION_ID%.*}
fi
nonPortableBuildID="${ID}.${VERSION_ID}-${buildArch}"
fi
fi
-
+
elif [ -e "${rootfsDir}/etc/redhat-release" ]; then
local redhatRelease=$(<${rootfsDir}/etc/redhat-release)
local rootfsDir=$4
# Setup whether this is a crossbuild. We can find this out if rootfsDir
- # is set.
+ # is set.
local isCrossBuild=0
if [ -z "${rootfsDir}" ]; then
local distroRid=""
# Check for musl-based distros (e.g Alpine Linux, Void Linux).
- if (ldd --version 2>&1 || true) | grep -q musl; then
+ if "${rootfsDir}/usr/bin/ldd" --version 2>&1 | grep -q musl; then
distroRid="linux-musl-${buildArch}"
fi
else
echo "__DistroRid: ${__DistroRid}"
echo "__RuntimeId: ${__DistroRid}"
-
+
export __RuntimeId=${__DistroRid}
fi
}