Skip to content

Commit

Permalink
Update update.ps1
Browse files Browse the repository at this point in the history
  • Loading branch information
chtof committed Feb 25, 2023
1 parent 086ab50 commit b1ac8ff
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions automatic/sd/update.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@
function global:au_BeforeUpdate { Get-RemoteFiles -NoSuffix -Purge }

function global:au_GetLatest {
$releases = 'http://www.ei5di.com'
$regex = '<a href="http://www.ei5di.com/sdhist.html"><b>V(?<Version>[0-9\.]+).*</b></a>'
$releases = 'https://www.ei5di.com'
$regex = '<a href="https://(www.)?ei5di.com/sdhist.html"><b>V(?<Version>[0-9\.]+).*</b></a>'

$download_page = Invoke-WebRequest -Uri $releases -UseBasicParsing
$download_page -match $regex | Out-Null
return @{ Version = $matches.Version ; URL32 = 'http://www.ei5di.com/sd/sdsetup.exe' }
$download_page.RawContent -match $regex | Out-Null
return @{ Version = $matches.Version ; URL32 = 'https://www.ei5di.com/sd/sdsetup.exe' }
}

function global:au_SearchReplace {
Expand All @@ -21,6 +21,4 @@ function global:au_SearchReplace {
}
}

if ($MyInvocation.InvocationName -ne '.') { # run the update only if script is not sourced
update -ChecksumFor none
}
update -ChecksumFor none

0 comments on commit b1ac8ff

Please sign in to comment.