mirror of
https://github.com/webinstall/webi-installers.git
synced 2026-02-14 17:49:53 +00:00
fix(windows): include User-Agent MS so that alias installs work in dev
This commit is contained in:
@@ -2,4 +2,4 @@
|
||||
|
||||
Write-Output "'archiver@$Env:WEBI_TAG' is an alias for 'arc@$Env:WEBI_VERSION'"
|
||||
IF ($null -eq $Env:WEBI_HOST -or $Env:WEBI_HOST -eq "") { $Env:WEBI_HOST = "https://webinstall.dev" }
|
||||
curl.exe -fsSL "$Env:WEBI_HOST/arc@$Env:WEBI_VERSION" | powershell
|
||||
curl.exe -A MS -fsSL "$Env:WEBI_HOST/arc@$Env:WEBI_VERSION" | powershell
|
||||
|
||||
@@ -2,4 +2,4 @@
|
||||
|
||||
Write-Output "'git-gpg-init@$Env:WEBI_TAG' is an alias for 'git-config-gpg@$Env:WEBI_VERSION'"
|
||||
IF ($null -eq $Env:WEBI_HOST -or $Env:WEBI_HOST -eq "") { $Env:WEBI_HOST = "https://webinstall.dev" }
|
||||
curl.exe -fsSL "$Env:WEBI_HOST/git-config-gpg@$Env:WEBI_VERSION" | powershell
|
||||
curl.exe -A MS -fsSL "$Env:WEBI_HOST/git-config-gpg@$Env:WEBI_VERSION" | powershell
|
||||
|
||||
@@ -27,7 +27,7 @@ Set-Content -Path "$Env:USERPROFILE\.local\bin\$MY_CMD.bat" -Value "@echo off`r`
|
||||
|
||||
$gpg_exists = Get-Command gpg 2> $null
|
||||
if (!$gpg_exists) {
|
||||
curl.exe "$Env:WEBI_HOST/gpg" | powershell
|
||||
curl.exe -A "$Env:WEBI_UA" -fsSL "$Env:WEBI_HOST/api/installers/gpg.ps1?formats=zip,exe,tar&libc=msvc" | powershell
|
||||
$gpg_exists = Get-Command gpg 2> $null
|
||||
if (!$gpg_exists) {
|
||||
Write-Output ""
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
Write-Output "'ripgrep@$Env:WEBI_TAG' is an alias for 'rg@$Env:WEBI_VERSION'"
|
||||
IF ($null -eq $Env:WEBI_HOST -or $Env:WEBI_HOST -eq "") { $Env:WEBI_HOST = "https://webinstall.dev" }
|
||||
curl.exe -fsSL "$Env:WEBI_HOST/rg@$Env:WEBI_VERSION" | powershell
|
||||
curl.exe -A MS -fsSL "$Env:WEBI_HOST/rg@$Env:WEBI_VERSION" | powershell
|
||||
|
||||
@@ -2,4 +2,4 @@
|
||||
|
||||
Write-Output "'trippy@$Env:WEBI_TAG' is an alias for 'trip@$Env:WEBI_VERSION'"
|
||||
IF ($null -eq $Env:WEBI_HOST -or $Env:WEBI_HOST -eq "") { $Env:WEBI_HOST = "https://webinstall.dev" }
|
||||
curl.exe -fsSL "$Env:WEBI_HOST/trip@$Env:WEBI_VERSION" | powershell
|
||||
curl.exe -A MS -fsSL "$Env:WEBI_HOST/trip@$Env:WEBI_VERSION" | powershell
|
||||
|
||||
@@ -103,7 +103,7 @@ if ($exename -eq "-V" -or $exename -eq "--version" -or $exename -eq "version" -o
|
||||
$PKG_URL = "$Env:WEBI_HOST/api/installers/$exename.ps1?formats=zip,exe,tar,git&libc=msvc"
|
||||
Write-Output "Downloading $PKG_URL"
|
||||
# Invoke-WebRequest -UserAgent "Windows amd64" "$PKG_URL" -OutFile ".\.local\tmp\$exename.install.ps1"
|
||||
& curl.exe -fsSL -A "$Env:WEBI_UA" "$PKG_URL" -o .\.local\tmp\$exename.install.ps1
|
||||
& curl.exe -A MS -fsSL -A "$Env:WEBI_UA" "$PKG_URL" -o .\.local\tmp\$exename.install.ps1
|
||||
|
||||
# Run <whatever>.ps1
|
||||
powershell .\.local\tmp\$exename.install.ps1
|
||||
|
||||
@@ -2,4 +2,4 @@
|
||||
|
||||
Write-Output "'zig.vim@$Env:WEBI_TAG' is an alias for 'vim-zig@$Env:WEBI_VERSION'"
|
||||
IF ($null -eq $Env:WEBI_HOST -or $Env:WEBI_HOST -eq "") { $Env:WEBI_HOST = "https://webinstall.dev" }
|
||||
curl.exe -fsSL "$Env:WEBI_HOST/vim-zig@$Env:WEBI_VERSION" | powershell
|
||||
curl.exe -A MS -fsSL "$Env:WEBI_HOST/vim-zig@$Env:WEBI_VERSION" | powershell
|
||||
|
||||
@@ -2,4 +2,4 @@
|
||||
|
||||
Write-Output "'ziglang@$Env:WEBI_TAG' is an alias for 'zig@$Env:WEBI_VERSION'"
|
||||
IF ($null -eq $Env:WEBI_HOST -or $Env:WEBI_HOST -eq "") { $Env:WEBI_HOST = "https://webinstall.dev" }
|
||||
curl.exe -fsSL "$Env:WEBI_HOST/zig@$Env:WEBI_VERSION" | powershell
|
||||
curl.exe -A MS -fsSL "$Env:WEBI_HOST/zig@$Env:WEBI_VERSION" | powershell
|
||||
|
||||
@@ -21,7 +21,7 @@ $pkg_download = "$Env:USERPROFILE\Downloads\webi\$Env:WEBI_PKG_FILE"
|
||||
# Fetch archive
|
||||
IF (!(Test-Path -Path "$Env:USERPROFILE\Downloads\webi\$Env:WEBI_PKG_FILE")) {
|
||||
Write-Output "Downloading zoxide from $Env:WEBI_PKG_URL to $pkg_download"
|
||||
& curl.exe -fsSL "$Env:WEBI_PKG_URL" -o "$pkg_download.part"
|
||||
& curl.exe -A MS -fsSL "$Env:WEBI_PKG_URL" -o "$pkg_download.part"
|
||||
& Move-Item "$pkg_download.part" "$pkg_download"
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user