Update dotnet-install to select linux-musl on alpine
This commit is contained in:
parent
65d5730631
commit
a90f10f629
1 changed files with 5 additions and 6 deletions
11
scripts/obtain/dotnet-install.sh
vendored
11
scripts/obtain/dotnet-install.sh
vendored
|
@ -136,10 +136,6 @@ get_linux_platform_name() {
|
||||||
else
|
else
|
||||||
if [ -e /etc/os-release ]; then
|
if [ -e /etc/os-release ]; then
|
||||||
. /etc/os-release
|
. /etc/os-release
|
||||||
if [[ $ID == "alpine" ]]; then
|
|
||||||
# remove the last version digit
|
|
||||||
VERSION_ID=${VERSION_ID%.*}
|
|
||||||
fi
|
|
||||||
echo "$ID.$VERSION_ID"
|
echo "$ID.$VERSION_ID"
|
||||||
return 0
|
return 0
|
||||||
elif [ -e /etc/redhat-release ]; then
|
elif [ -e /etc/redhat-release ]; then
|
||||||
|
@ -166,9 +162,12 @@ get_current_os_name() {
|
||||||
local linux_platform_name
|
local linux_platform_name
|
||||||
linux_platform_name="$(get_linux_platform_name)" || { echo "linux" && return 0 ; }
|
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
|
echo $linux_platform_name
|
||||||
return 0
|
return 0
|
||||||
|
elif [[ $linux_platform_name == alpine* ]]; then
|
||||||
|
echo "linux-musl"
|
||||||
|
return 0
|
||||||
else
|
else
|
||||||
echo "linux"
|
echo "linux"
|
||||||
return 0
|
return 0
|
||||||
|
@ -597,7 +596,7 @@ copy_files_or_dirs_from_list() {
|
||||||
local osname="$(get_current_os_name)"
|
local osname="$(get_current_os_name)"
|
||||||
local override_switch=$(
|
local override_switch=$(
|
||||||
if [ "$override" = false ]; then
|
if [ "$override" = false ]; then
|
||||||
if [[ "$osname" == 'alpine'* ]]; then
|
if [[ "$osname" == 'alpine'* ]]; then
|
||||||
printf -- "-u";
|
printf -- "-u";
|
||||||
else
|
else
|
||||||
printf -- "-n";
|
printf -- "-n";
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue