Skip to content

Commit

Permalink
Exe from website instead of zip
Browse files Browse the repository at this point in the history
  • Loading branch information
tunisiano187 committed Dec 16, 2024
1 parent 3ce0c1d commit 86def8a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 10 deletions.
10 changes: 1 addition & 9 deletions automatic/sd-card-formatter/tools/chocolateyinstall.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,8 @@ $packageArgs = @{
url = $url
checksum = $Checksum
checksumType = $ChecksumType
UnzipLocation = Join-path $env:TEMP $env:chocolateyPackageName
}
Install-ChocolateyZipPackage @packageArgs

$url = $(Get-ChildItem -Path $(Join-path $env:TEMP $env:chocolateyPackageName) -Filter *.exe -Recurse).FullName

$packageArgs = @{
packageName = $env:chocolateyPackageName
fileType = 'EXE'
url = $url
silentArgs = '/s /v"/qn /norestart"'
}

Install-ChocolateyPackage @packageArgs
2 changes: 1 addition & 1 deletion automatic/sd-card-formatter/update.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ function global:au_AfterUpdate($Package) {
}

function global:au_GetLatest {
$url32 = "https://www.sdcard.org$(((Invoke-WebRequest -Uri $releases -UseBasicParsing).Links | Where-Object {$_ -match 'Accept'} | Where-Object {$_.href -match '.zip'}).href.replace('./',''))"
$url32 = "https://www.sdcard.org$(((Invoke-WebRequest -Uri $releases -UseBasicParsing).Links | Where-Object {$_ -match 'Accept'} | Where-Object {$_.href -match '.exe'}).href.replace('./',''))"
$url = "https://www.sdcard.org/downloads/formatter/"
$pageContent = Invoke-WebRequest -Uri $url -UseBasicParsing
$versionPattern = 'SD Memory Card Formatter\s*(\d+\.\d+\.\d+)'
Expand Down

0 comments on commit 86def8a

Please sign in to comment.