forked from norman/fusionpbx-install.sh-github-mirror
Update the Windows install.
This commit is contained in:
10
windows/resources/get-link.ps1
Normal file
10
windows/resources/get-link.ps1
Normal file
@@ -0,0 +1,10 @@
|
||||
|
||||
# Get page with links, filter, and select latest version using pattern. Return file download URL.
|
||||
Function Get-Link([string]$url, [string]$pattern) {
|
||||
$link = (Invoke-WebRequest $url).Links | Where-Object {$_.href -like $pattern} | Select-Object -Last 1
|
||||
Write-Host $link.href -ForegroundColor Gray
|
||||
|
||||
#Use System.URI to combine url parts
|
||||
$uri = New-Object -TypeName System.URI -ArgumentList ([System.URI]$url),($link.href)
|
||||
return $uri.AbsoluteUri
|
||||
}
|
||||
Reference in New Issue
Block a user