Update dotnet-install to select linux-musl on alpine

This commit is contained in:
Wes Haggard 2018-04-20 12:42:26 -07:00
parent 65d5730631
commit a90f10f629

View file

@ -136,10 +136,6 @@ get_linux_platform_name() {
else
if [ -e /etc/os-release ]; then
. /etc/os-release
if [[ $ID == "alpine" ]]; then
# remove the last version digit
VERSION_ID=${VERSION_ID%.*}
fi
echo "$ID.$VERSION_ID"
return 0
elif [ -e /etc/redhat-release ]; then
@ -166,9 +162,12 @@ get_current_os_name() {
local linux_platform_name
linux_platform_name="$(get_linux_platform_name)" || { echo "linux" && return 0 ; }
if [[ $linux_platform_name == "rhel.6" || $linux_platform_name == "alpine.3.6" ]]; then
if [[ $linux_platform_name == "rhel.6" ]]; then
echo $linux_platform_name
return 0
elif [[ $linux_platform_name == alpine* ]]; then
echo "linux-musl"
return 0
else
echo "linux"
return 0
@ -597,7 +596,7 @@ copy_files_or_dirs_from_list() {
local osname="$(get_current_os_name)"
local override_switch=$(
if [ "$override" = false ]; then
if [[ "$osname" == 'alpine'* ]]; then
if [[ "$osname" == 'alpine'* ]]; then
printf -- "-u";
else
printf -- "-n";