|
|
|
@ -833,6 +833,10 @@ if ($matches.count) { |
|
|
|
|
|
|
|
|
|
|
|
#<powershell-payload> |
|
|
|
#<powershell-payload> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#launch example |
|
|
|
|
|
|
|
#powershell -Command "Invoke-WebRequest -Uri 'https://www.gitea1.intx.com.au/jn/punkshell/raw/branch/master/bin/getzig.cmd' -OutFile 'getzig.cmd'; Start-Process 'cmd.exe' -ArgumentList @('/c', 'getzig.cmd') -NoNewWindow -Wait" |
|
|
|
|
|
|
|
#powershell -Command "Invoke-WebRequest -Uri 'https://www.gitea1.intx.com.au/jn/punkshell/raw/branch/master/bin/getzig.cmd' -OutFile 'getzig.cmd'; Start-Process 'getzig.cmd' -NoNewWindow -Wait" |
|
|
|
|
|
|
|
|
|
|
|
#Join-Path using verbose method to support powershell 5? |
|
|
|
#Join-Path using verbose method to support powershell 5? |
|
|
|
#$outbase = Join-Path -Path $PSScriptRoot -ChildPath "../.." |
|
|
|
#$outbase = Join-Path -Path $PSScriptRoot -ChildPath "../.." |
|
|
|
$outbase = $PSScriptRoot |
|
|
|
$outbase = $PSScriptRoot |
|
|
|
@ -892,20 +896,26 @@ if (Get-Command "minisign" -ErrorAction SilentlyContinue) { |
|
|
|
Write-Host "Installing minisign version: ${wingetversion}" |
|
|
|
Write-Host "Installing minisign version: ${wingetversion}" |
|
|
|
Install-WinGetPackage -Id "jedisct1.minisign" |
|
|
|
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) { |
|
|
|
if (Get-Command "minisign" -ErrorAction SilentlyContinue) { |
|
|
|
Write-Host "minisign is now available" |
|
|
|
Write-Host "minisign is now available" |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
Write-Host "minisign is still not available" |
|
|
|
Write-Host "minisign is still not available" |
|
|
|
|
|
|
|
exit |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
exit |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
$zigpubkey = "RWSGOq2NVecA2UPNdBUZykf1CCb147pkmdtYxgb3Ti+JO/wCYvhbAb/U" |
|
|
|
$zigpubkey = "RWSGOq2NVecA2UPNdBUZykf1CCb147pkmdtYxgb3Ti+JO/wCYvhbAb/U" |
|
|
|
$mirrors_url = "https://ziglang.org/download/community-mirrors.txt" |
|
|
|
$mirrors_url = "https://ziglang.org/download/community-mirrors.txt" |
|
|
|
$mirrors_response = $(Invoke-WebRequest -Uri $mirrors_url) |
|
|
|
$mirrors_response = $(Invoke-WebRequest -Uri $mirrors_url) |
|
|
|
if ($mirrors_response.StatusCode -eq 200) { |
|
|
|
if ($mirrors_response.StatusCode -eq 200) { |
|
|
|
$mirror_array = $mirrors_response.Content.TrimEnd("`r`n") -split "`r`n|`n" |
|
|
|
#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 += $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://bogusxxx.org" #test behaviour of a bogus/down entry |
|
|
|
$mirror_array += "https://ziglang.org" #main site |
|
|
|
$mirror_array += "https://ziglang.org" #main site |
|
|
|
|
|
|
|
|
|
|
|
|