Skip to content

Commit

Permalink
Allow simple metalink and meta4 hash extraction
Browse files Browse the repository at this point in the history
  • Loading branch information
r15ch13 committed Aug 14, 2018
1 parent e5d78e2 commit ecf627c
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/autoupdate.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,10 @@ function find_hash_in_textfile([String] $url, [String] $basename, [String] $rege
if ($hashfile -match $filenameRegex) {
$hash = $matches[1]
}
$metalinkRegex = "<hash[^>]+>(?<meta>[a-fA-F0-9]{64})"
if ($hashfile -match $metalinkRegex) {
$hash = $matches[1]
}
}

return format_hash $hash
Expand Down

0 comments on commit ecf627c

Please sign in to comment.