Update install scripts to v2026.05.19 (#736)

Update externals/install-dotnet.ps1 and externals/install-dotnet.sh to
the v2026.05.19 release of dotnet/install-scripts. This uptakes the
changes from dotnet/install-scripts#697 which preserves archive links
during installation (hardlinks on Windows, symlinks on Linux) as part
of dotnet/sdk#52182.

On Windows, .NET 11.0+ is now installed via tar.gz archives which
preserves hardlinks, significantly reducing disk space usage.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
Michael Simons
2026-05-26 12:22:17 -05:00
committed by GitHub
parent f1970f5ca3
commit 8404272362
2 changed files with 353 additions and 227 deletions

View File

@@ -1003,12 +1003,12 @@ copy_files_or_dirs_from_list() {
cat | uniq | while read -r file_path; do
local path="$(remove_beginning_slash "${file_path#$root_path}")"
local target="$out_path/$path"
if [ "$override" = true ] || (! ([ -d "$target" ] || [ -e "$target" ])); then
if [ "$override" = true ] || (! ([ -d "$target" ] || [ -e "$target" ] || [ -L "$target" ])); then
mkdir -p "$out_path/$(dirname "$path")"
if [ -d "$target" ]; then
if [ -d "$target" ] || [ -L "$target" ]; then
rm -rf "$target"
fi
cp -R $override_switch "$root_path/$path" "$target"
cp -RP $override_switch "$root_path/$path" "$target"
fi
done
}
@@ -1053,8 +1053,8 @@ extract_dotnet_package() {
tar -xzf "$zip_path" -C "$temp_out_path" > /dev/null || failed=true
local folders_with_version_regex='^.*/[0-9]+\.[0-9]+[^/]+/'
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
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"
find "$temp_out_path" \( -type f -o -type l \) | grep -Eo "$folders_with_version_regex" | sort | copy_files_or_dirs_from_list "$temp_out_path" "$out_path" false
find "$temp_out_path" \( -type f -o -type l \) | grep -Ev "$folders_with_version_regex" | copy_files_or_dirs_from_list "$temp_out_path" "$out_path" "$override_non_versioned_files"
validate_remote_local_file_sizes "$zip_path" "$remote_file_size"