@@ -406,8 +406,8 @@ get_normalized_architecture_for_specific_sdk_version() {
406406
407407 if [ " $osname " == " osx" ] && [ " $architecture " == " arm64" ] && { [ " $is_version_support_arm64 " = false ] || [ " $is_channel_support_arm64 " = false ]; }; then
408408 # check if rosetta is installed
409- if [ " $( /usr/bin/pgrep oahd > /dev/null 2>&1 ; echo $? ) " -eq 0 ]; then
410- say_verbose " Changing user architecture from '$architecture ' to 'x64' because .NET SDKs prior to version 6.0 do not support arm64."
409+ if [ " $( /usr/bin/pgrep oahd > /dev/null 2>&1 ; echo $? ) " -eq 0 ]; then
410+ say_verbose " Changing user architecture from '$architecture ' to 'x64' because .NET SDKs prior to version 6.0 do not support arm64."
411411 echo " x64"
412412 return 0;
413413 else
@@ -423,17 +423,11 @@ get_normalized_architecture_for_specific_sdk_version() {
423423# args:
424424# version or channel - $1
425425is_arm64_supported () {
426- # Extract the major version by splitting on the dot
427- major_version=" ${1%% .* } "
428-
429- # Check if the major version is a valid number and less than 6
430- case " $major_version " in
431- [0-9]* )
432- if [ " $major_version " -lt 6 ]; then
433- echo false
434- return 0
435- fi
436- ;;
426+ # any channel or version that starts with the specified versions
427+ case " $1 " in
428+ ( " 1" * | " 2" * | " 3" * | " 4" * | " 5" * )
429+ echo false
430+ return 0
437431 esac
438432
439433 echo true
@@ -591,7 +585,7 @@ is_dotnet_package_installed() {
591585# args:
592586# downloaded file - $1
593587# remote_file_size - $2
594- validate_remote_local_file_sizes ()
588+ validate_remote_local_file_sizes ()
595589{
596590 eval $invocation
597591
@@ -604,8 +598,8 @@ validate_remote_local_file_sizes()
604598 elif [[ " $OSTYPE " == " darwin" * ]]; then
605599 # hardcode in order to avoid conflicts with GNU stat
606600 file_size=" $( /usr/bin/stat -f ' %z' " $downloaded_file " ) "
607- fi
608-
601+ fi
602+
609603 if [ -n " $file_size " ]; then
610604 say " Downloaded file size is $file_size bytes."
611605
@@ -616,10 +610,10 @@ validate_remote_local_file_sizes()
616610 say " The remote and local file sizes are equal."
617611 fi
618612 fi
619-
613+
620614 else
621- say " Either downloaded or local package size can not be measured. One of them may be corrupted."
622- fi
615+ say " Either downloaded or local package size can not be measured. One of them may be corrupted."
616+ fi
623617}
624618
625619# args:
@@ -799,7 +793,7 @@ get_specific_product_version() {
799793 fi
800794 fi
801795 done
802-
796+
803797 # Getting the version number with productVersion.txt has failed. Try parsing the download link for a version number.
804798 say_verbose " Failed to get the version using productVersion.txt file. Download link will be parsed instead."
805799 specific_product_version=" $( get_product_specific_version_from_download_link " $package_download_link " " $specific_version " ) "
@@ -864,7 +858,7 @@ get_product_specific_version_from_download_link()
864858
865859 local download_link=" $1 "
866860 local specific_version=" $2 "
867- local specific_product_version=" "
861+ local specific_product_version=" "
868862
869863 if [ -z " $download_link " ]; then
870864 echo " $specific_version "
@@ -1055,9 +1049,9 @@ extract_dotnet_package() {
10551049 local folders_with_version_regex=' ^.*/[0-9]+\.[0-9]+[^/]+/'
10561050 find " $temp_out_path " -type f | grep -Eo " $folders_with_version_regex " | sort | copy_files_or_dirs_from_list " $temp_out_path " " $out_path " false
10571051 find " $temp_out_path " -type f | grep -Ev " $folders_with_version_regex " | copy_files_or_dirs_from_list " $temp_out_path " " $out_path " " $override_non_versioned_files "
1058-
1052+
10591053 validate_remote_local_file_sizes " $zip_path " " $remote_file_size "
1060-
1054+
10611055 rm -rf " $temp_out_path "
10621056 if [ -z ${keep_zip+x} ]; then
10631057 rm -f " $zip_path " && say_verbose " Temporary archive file $zip_path was removed"
@@ -1204,7 +1198,7 @@ downloadcurl() {
12041198 curl $curl_options -o " $out_path " " $remote_path_with_credential " 2>&1
12051199 curl_exit_code=$?
12061200 fi
1207-
1201+
12081202 if [ $curl_exit_code -gt 0 ]; then
12091203 download_error_msg=" Unable to download $remote_path ."
12101204 # Check for curl timeout codes
@@ -1337,7 +1331,7 @@ get_download_link_from_aka_ms() {
13371331 say_warning " Specifying quality for STS or LTS channel is not supported, the quality will be ignored."
13381332 fi
13391333
1340- say_verbose " Retrieving primary payload URL from aka.ms for channel: '$normalized_channel ', quality: '$normalized_quality ', product: '$normalized_product ', os: '$normalized_os ', architecture: '$normalized_architecture '."
1334+ say_verbose " Retrieving primary payload URL from aka.ms for channel: '$normalized_channel ', quality: '$normalized_quality ', product: '$normalized_product ', os: '$normalized_os ', architecture: '$normalized_architecture '."
13411335
13421336 # construct aka.ms link
13431337 aka_ms_link=" https://aka.ms/dotnet"
@@ -1538,14 +1532,14 @@ generate_regular_links() {
15381532
15391533 if [ " $valid_legacy_download_link " = true ]; then
15401534 say_verbose " Constructed legacy named payload URL: $legacy_download_link "
1541-
1535+
15421536 download_links+=($legacy_download_link )
15431537 specific_versions+=($specific_version )
15441538 effective_versions+=($effective_version )
15451539 link_types+=(" legacy" )
15461540 else
15471541 legacy_download_link=" "
1548- say_verbose " Cound not construct a legacy_download_link; omitting..."
1542+ say_verbose " Could not construct a legacy_download_link; omitting..."
15491543 fi
15501544
15511545 # Check if the SDK version is already installed.
@@ -1566,7 +1560,7 @@ print_dry_run() {
15661560
15671561 resolved_version=${specific_versions[0]}
15681562 repeatable_command=" ./$script_name --version " \" " $resolved_version " \" " --install-dir " \" " $install_root " \" " --architecture " \" " $normalized_architecture " \" " --os " \" " $normalized_os " \" " "
1569-
1563+
15701564 if [ ! -z " $normalized_quality " ]; then
15711565 repeatable_command+=" --quality " \" " $normalized_quality " \" " "
15721566 fi
18631857 echo " -q,--quality <quality> Download the latest build of specified quality in the channel."
18641858 echo " -Quality"
18651859 echo " The possible values are: daily, signed, validated, preview, GA."
1866- echo " Works only in combination with channel. Not applicable for STS and LTS channels and will be ignored if those channels are used."
1867- echo " For SDK use channel in A.B.Cxx format. Using quality for SDK together with channel in A.B format is not supported."
1868- echo " Supported since 5.0 release."
1860+ echo " Works only in combination with channel. Not applicable for STS and LTS channels and will be ignored if those channels are used."
1861+ echo " For SDK use channel in A.B.Cxx format. Using quality for SDK together with channel in A.B format is not supported."
1862+ echo " Supported since 5.0 release."
18691863 echo " Note: The version parameter overrides the channel parameter when any version other than 'latest' is used, and therefore overrides the quality."
18701864 echo " --internal,-Internal Download internal builds. Requires providing credentials via --feed-credential parameter."
18711865 echo " --feed-credential <FEEDCREDENTIAL> Token to access Azure feed. Used as a query string to append to the Azure feed."
0 commit comments