Created
March 6, 2025 14:09
-
-
Save michaelmob/9555e83406268e2775d4f239294d8063 to your computer and use it in GitHub Desktop.
Windows: Download lilnasy's automated builds of zed to ~/Apps
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Description: Download lilnasy's automated builds of Zed to ~/Apps | |
# Author: github.com/michaelmob | |
# Last Updated: 2025-03-06 | |
$fileName = if ($args.Count -gt 0) { $args[0] } else { "zed.exe" } | |
$zedLatest = Invoke-RestMethod -Uri "https://api.github.com/repos/lilnasy/zed-windows-builds/releases/latest" | |
$downloadUrl = $zedLatest.assets | | |
Where-Object { $_.name -like $fileName } | | |
Select-Object -ExpandProperty browser_download_url -First 1 | |
$appsPath = Join-Path -Path $env:USERPROFILE -ChildPath "Apps" | |
if (-not (Test-Path -Path $appsPath)) { | |
New-Item -ItemType Directory -Path $appsPath | |
} | |
$outFile = Join-Path -Path $appsPath -ChildPath (Split-Path -Leaf $downloadUrl) | |
Invoke-WebRequest -Uri $downloadUrl -OutFile $outFile | |
Start-Process -FilePath $outFile -NoNewWindow |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment