"Fossies" - the Fresh Open Source Software Archive

Member "protobuf-3.21.1/csharp/install_dotnet_sdk.ps1" (27 May 2022, 794 Bytes) of package /linux/misc/protobuf-all-3.21.1.tar.gz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) Microsoft PowerShell source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file. See also the last Fossies "Diffs" side-by-side code changes report for "install_dotnet_sdk.ps1": 3.19.4_vs_3.20.1.

    1 #!/usr/bin/env powershell
    2 # Install dotnet SDK using the official dotnet-install.ps1 script
    3 
    4 Set-StrictMode -Version 2
    5 $ErrorActionPreference = 'Stop'
    6 
    7 # avoid "Unknown error on a send" in Invoke-WebRequest
    8 [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
    9 
   10 $InstallScriptUrl = 'https://dot.net/v1/dotnet-install.ps1'
   11 $InstallScriptPath = Join-Path  "$env:TEMP" 'dotnet-install.ps1'
   12 
   13 # Download install script
   14 Write-Host "Downloading install script: $InstallScriptUrl => $InstallScriptPath"
   15 Invoke-WebRequest -Uri $InstallScriptUrl -OutFile $InstallScriptPath
   16 
   17 # The SDK versions to install should be kept in sync with versions
   18 # installed by kokoro/linux/dockerfile/test/csharp/Dockerfile
   19 &$InstallScriptPath -Version 3.1.415
   20 &$InstallScriptPath -Version 6.0.100