44 lines
1.1 KiB
Bash
Executable File
44 lines
1.1 KiB
Bash
Executable File
#!/bin/bash
|
|
|
|
set -euo pipefail
|
|
|
|
set -x
|
|
|
|
bootstrap_dir=$(readlink -f "$1")
|
|
|
|
version=$(jq -r '.tools.dotnet' "$bootstrap_dir"/global.json)
|
|
|
|
date=$(date +%F)
|
|
|
|
mkdir -p "dotnet-arm64-prebuilts-$date"
|
|
|
|
pushd "dotnet-arm64-prebuilts-$date"
|
|
|
|
# Getting the exact matching rc2 version gets us an arm64 build without this
|
|
# fix https://github.com/dotnet/runtime/pull/58959. That causes a segfault on
|
|
# startup.
|
|
# wget "https://dotnetcli.azureedge.net/dotnet/Sdk/$version/dotnet-sdk-$version-linux-arm64.tar.gz"
|
|
|
|
wget https://aka.ms/dotnet/6.0.1XX-rc2/daily/dotnet-sdk-linux-arm64.tar.gz
|
|
|
|
mapfile -t linux_x64_packages < <(tar tf "$bootstrap_dir"/packages/archive/Private.SourceBuilt.Artifacts.*.tar.gz | grep linux-x64)
|
|
|
|
for package in "${linux_x64_packages[@]}"; do
|
|
if [[ "$package" = *'.Intermediate.'* ]]; then
|
|
continue;
|
|
fi
|
|
|
|
filename=${package##*/}
|
|
name=${filename%.7.0*}
|
|
arm_name=${name/linux-x64/linux-arm64}
|
|
version="7.0${filename##*6.0}"
|
|
version=${version%.*}
|
|
|
|
nappo download --verbose "$arm_name" "$version"
|
|
|
|
done
|
|
|
|
popd
|
|
|
|
tar czf "dotnet-arm64-prebuilts-$date.tar.gz" "dotnet-arm64-prebuilts-$date"
|