Dotnet install-script updates (#9033)
* Introduce support for arm & arm64 architectures; when detecting a missing 'library' prerequisite - do not fail the installation. * Auto-detect 'armv7l' and 'aarch64'
This commit is contained in:
parent
832052a9c8
commit
996eb6c92c
1 changed files with 29 additions and 16 deletions
45
scripts/obtain/dotnet-install.sh
vendored
45
scripts/obtain/dotnet-install.sh
vendored
|
@ -230,8 +230,6 @@ check_min_reqs() {
|
|||
check_pre_reqs() {
|
||||
eval $invocation
|
||||
|
||||
local failing=false;
|
||||
|
||||
if [ "${DOTNET_INSTALL_SKIP_PREREQS:-}" = "1" ]; then
|
||||
return 0
|
||||
fi
|
||||
|
@ -247,14 +245,10 @@ check_pre_reqs() {
|
|||
local librarypath=${LD_LIBRARY_PATH:-}
|
||||
LDCONFIG_COMMAND="$LDCONFIG_COMMAND -NXv ${librarypath//:/ }"
|
||||
|
||||
[ -z "$($LDCONFIG_COMMAND 2>/dev/null | grep libunwind)" ] && say_err "Unable to locate libunwind. Install libunwind to continue" && failing=true
|
||||
[ -z "$($LDCONFIG_COMMAND 2>/dev/null | grep libssl)" ] && say_err "Unable to locate libssl. Install libssl to continue" && failing=true
|
||||
[ -z "$($LDCONFIG_COMMAND 2>/dev/null | grep libicu)" ] && say_err "Unable to locate libicu. Install libicu to continue" && failing=true
|
||||
[ -z "$($LDCONFIG_COMMAND 2>/dev/null | grep -F libcurl.so)" ] && say_err "Unable to locate libcurl. Install libcurl to continue" && failing=true
|
||||
fi
|
||||
|
||||
if [ "$failing" = true ]; then
|
||||
return 1
|
||||
[ -z "$($LDCONFIG_COMMAND 2>/dev/null | grep libunwind)" ] && say_warning "Unable to locate libunwind. Probable prerequisite missing; please install libunwind."
|
||||
[ -z "$($LDCONFIG_COMMAND 2>/dev/null | grep libssl)" ] && say_warning "Unable to locate libssl. Probable prerequisite missing; please install libssl."
|
||||
[ -z "$($LDCONFIG_COMMAND 2>/dev/null | grep libicu)" ] && say_warning "Unable to locate libicu. Probable prerequisite missing; please install libicu."
|
||||
[ -z "$($LDCONFIG_COMMAND 2>/dev/null | grep -F libcurl.so)" ] && say_warning "Unable to locate libcurl. Probable prerequisite missing; please install libcurl."
|
||||
fi
|
||||
|
||||
return 0
|
||||
|
@ -312,7 +306,21 @@ combine_paths() {
|
|||
get_machine_architecture() {
|
||||
eval $invocation
|
||||
|
||||
# Currently the only one supported
|
||||
if command -v uname > /dev/null; then
|
||||
CPUName=$(uname -m)
|
||||
case $CPUName in
|
||||
armv7l)
|
||||
echo "arm"
|
||||
return 0
|
||||
;;
|
||||
aarch64)
|
||||
echo "arm64"
|
||||
return 0
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
|
||||
# Always default to 'x64'
|
||||
echo "x64"
|
||||
return 0
|
||||
}
|
||||
|
@ -332,9 +340,13 @@ get_normalized_architecture_from_architecture() {
|
|||
echo "x64"
|
||||
return 0
|
||||
;;
|
||||
x86)
|
||||
say_err "Architecture \`x86\` currently not supported"
|
||||
return 1
|
||||
arm)
|
||||
echo "arm"
|
||||
return 0
|
||||
;;
|
||||
arm64)
|
||||
echo "arm64"
|
||||
return 0
|
||||
;;
|
||||
esac
|
||||
|
||||
|
@ -872,7 +884,7 @@ do
|
|||
echo "$script_name is a simple command line interface for obtaining dotnet cli."
|
||||
echo ""
|
||||
echo "Options:"
|
||||
echo " -c,--channel <CHANNEL> Download from the CHANNEL specified, Defaults to \`$channel\`."
|
||||
echo " -c,--channel <CHANNEL> Download from the channel specified, Defaults to \`$channel\`."
|
||||
echo " -Channel"
|
||||
echo " Possible values:"
|
||||
echo " - Current - most current release"
|
||||
|
@ -891,8 +903,9 @@ do
|
|||
echo " examples: 2.0.0-preview2-006120; 1.1.0"
|
||||
echo " -i,--install-dir <DIR> Install under specified location (see Install Location below)"
|
||||
echo " -InstallDir"
|
||||
echo " --architecture <ARCHITECTURE> Architecture of .NET Tools. Currently only x64 is supported."
|
||||
echo " --architecture <ARCHITECTURE> Architecture of dotnet binaries to be installed, Defaults to \`$architecture\`."
|
||||
echo " --arch,-Architecture,-Arch"
|
||||
echo " Possible values: x64, arm, and arm64"
|
||||
echo " --runtime <RUNTIME> Installs a shared runtime only, without the SDK."
|
||||
echo " -Runtime"
|
||||
echo " Possible values:"
|
||||
|
|
Loading…
Reference in a new issue