better ifnding of the correct exe

This commit is contained in:
Mylloon 2024-09-12 21:29:43 +02:00
parent f498635760
commit 7a0cf5c2cd
Signed by: Anri
GPG key ID: A82D63DFF8D1317F

View file

@ -12,7 +12,8 @@ ECHO Outer Wilds Mod Manager...
PowerShell -Command "" ^
"$repo = 'ow-mods/ow-mod-man';" ^
"$releases = \"https://api.github.com/repos/$repo/releases/latest\";" ^
"$link = (Invoke-WebRequest $releases | ConvertFrom-Json)[0].assets.browser_download_url[7];" ^
"$assets = (Invoke-WebRequest $releases | ConvertFrom-Json)[0].assets;" ^
"$link = ($assets | Where-Object { $_.name -like '*_x64_en-US.msi' }).browser_download_url;" ^
"$exe = 'Outer.Wilds.Mod.Manager-setup.msi';" ^
"$outFile = Join-Path -Path $env:TEMP -ChildPath $exe;" ^
"Invoke-WebRequest -Uri $link -OutFile $outFile;" ^