|
|
|
@ -896,15 +896,20 @@ if (Get-Command "minisign" -ErrorAction SilentlyContinue) {
|
|
|
|
|
Write-Host "Installing minisign version: ${wingetversion}" |
|
|
|
|
Install-WinGetPackage -Id "jedisct1.minisign" |
|
|
|
|
} |
|
|
|
|
if ($PSVersionTable.PSEdition -eq "Desktop") { |
|
|
|
|
Invoke-Command {& "powershell.exe" } -NoNewScope |
|
|
|
|
} else { |
|
|
|
|
Invoke-Command {& "pwsh.exe" } -NoNewScope |
|
|
|
|
} |
|
|
|
|
if (Get-Command "minisign" -ErrorAction SilentlyContinue) { |
|
|
|
|
Write-Host "minisign is now available" |
|
|
|
|
} else { |
|
|
|
|
Write-Host "minisign is still not available" |
|
|
|
|
#if we automatically relaunch - we could get stuck in a loop - ask user. |
|
|
|
|
$response = read-host -Prompt "Relaunching process may make minizip available. Relaunch? Y|N" |
|
|
|
|
#if ($PSVersionTable.PSEdition -eq "Desktop") { |
|
|
|
|
#powershell.exe |
|
|
|
|
#} else { |
|
|
|
|
#pwsh.exe |
|
|
|
|
#} |
|
|
|
|
if ($response -ieq "y") { |
|
|
|
|
Start-Process 'getzig.cmd' -NoNewWindow -Wait |
|
|
|
|
} |
|
|
|
|
exit |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
@ -914,7 +919,7 @@ $mirrors_url = "https://ziglang.org/download/community-mirrors.txt"
|
|
|
|
|
$mirrors_response = $(Invoke-WebRequest -Uri $mirrors_url) |
|
|
|
|
if ($mirrors_response.StatusCode -eq 200) { |
|
|
|
|
#https://www.gitea1.intx.com.au/jn/punkbin/raw/branch/master/win64/tools/zig-x86_64-windows-0.15.1.zip |
|
|
|
|
$mirror_array = "https://gitea1.intx.com.au/jn/punkbin/raw/branch/master/win64/tools" |
|
|
|
|
$mirror_array = @("https://gitea1.intx.com.au/jn/punkbin/raw/branch/master/win64/tools") |
|
|
|
|
$mirror_array += $mirrors_response.Content.TrimEnd("`r`n") -split "`r`n|`n" |
|
|
|
|
#$mirror_array += "https://bogusxxx.org" #test behaviour of a bogus/down entry |
|
|
|
|
$mirror_array += "https://ziglang.org" #main site |
|
|
|
|