Skip to content

Commit

Permalink
fix download
Browse files Browse the repository at this point in the history
  • Loading branch information
a-mnich committed May 14, 2024
1 parent 884650e commit df65942
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions Scripts/Test-Manifest.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,20 @@ Param(
[string] $WinGetOptions
)
#$Manifest = ".\GitButler\0.11.2\"
#$ManifestURL = "https://raw.githubusercontent.com/damn-good-b0t/winget-pkgs/Fork.Fork-1.96.1-60B8126F09D3495BA056C9FC260021FE/manifests/f/Fork/Fork/1.96.1"
$ManifestURL = $ManifestURL.TrimEnd('/')
$SplittedURL = $ManifestURL -split '/'
#$version = $SplittedURL[-1]
$package = "$($SplittedURL[-2]).$($SplittedURL[-3])"
#download installer
if (Test-Path -Path (Join-Path -Path ([System.IO.Path]::GetTempPath()) -ChildPath 'ManifestDownload')) {
Remove-Item -Path (Join-Path -Path ([System.IO.Path]::GetTempPath()) -ChildPath 'ManifestDownload') -Force -Recurse
}
$Manifest = New-Item -ItemType Directory -Path (Join-Path -Path ([System.IO.Path]::GetTempPath()) -ChildPath 'ManifestDownload')
Invoke-WebRequest -Uri "$ManifestURL\$package.yaml" -OutFile "$Manifest\$package.yaml"
Invoke-WebRequest -Uri "$ManifestURL\$package.yaml" -OutFile "$Manifest\$package.installer.yaml"
Invoke-WebRequest -Uri "$ManifestURL\$package.yaml" -OutFile "$Manifest\$package.locale.en-US.yaml"

Invoke-WebRequest -Uri "$ManifestURL\$package.installer.yaml" -OutFile "$Manifest\$package.installer.yaml"
Invoke-WebRequest -Uri "$ManifestURL\$package.locale.en-US.yaml" -OutFile "$Manifest\$package.locale.en-US.yaml"
Write-Host "Manifest Path: $Manifest"



Expand Down

0 comments on commit df65942

Please sign in to comment.