mirror of
https://github.com/webinstall/webi-installers.git
synced 2026-05-28 19:42:49 +00:00
Compare commits
2 Commits
ref-webi-g
...
copilot/bu
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
76c957e8d2 | ||
|
|
97fc71a066 |
@@ -7,6 +7,11 @@
|
||||
New-Item -Path "$Env:USERPROFILE\Downloads\webi" -ItemType Directory -Force | Out-Null
|
||||
New-Item -Path "$Env:USERPROFILE\.local\bin" -ItemType Directory -Force | Out-Null
|
||||
if ($null -eq $Env:WEBI_HOST -or $Env:WEBI_HOST -eq "") { $Env:WEBI_HOST = "https://webinstall.dev" }
|
||||
curl.exe -s -A "windows" "$Env:WEBI_HOST/packages/webi/webi-pwsh.ps1" -o "$Env:USERPROFILE\.local\bin\webi-pwsh.ps1"
|
||||
$b_webi_ps1 = "$Env:USERPROFILE\.local\bin\webi-pwsh.ps1"
|
||||
curl.exe -s -A "windows" "$Env:WEBI_HOST/packages/webi/webi-pwsh.ps1" | Out-File -Encoding utf8 "$b_webi_ps1"
|
||||
if ($LASTEXITCODE -ne 0 -or -not (Test-Path "$b_webi_ps1") -or (Get-Item "$b_webi_ps1").Length -lt 100) {
|
||||
Write-Error "error: failed to download '$Env:WEBI_HOST/packages/webi/webi-pwsh.ps1'"
|
||||
exit 1
|
||||
}
|
||||
Set-ExecutionPolicy -Scope Process Bypass
|
||||
& "$Env:USERPROFILE\.local\bin\webi-pwsh.ps1" "{{ exename }}"
|
||||
& "$b_webi_ps1" "{{ exename }}"
|
||||
|
||||
Reference in New Issue
Block a user