Created
August 24, 2021 12:04
-
-
Save adotcoop/c56bc8f495caf26f57180a1f40bc675e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Get latest download URI for LTR and latest version of QGIS | |
# parses the website configuration from github, not scraping the html so should be a bit more reliable | |
$uri = "https://raw.githubusercontent.com/qgis/QGIS-Website/master/source/schedule.py" | |
$Content = (Invoke-WebRequest -UseBasicParsing -Uri $uri).Content | |
try { | |
$StringData = [RegEx]::Matches($Content, ".*=.*") | |
$Details = $StringData -Replace ("'", "") | ConvertFrom-StringData | |
} | |
catch { | |
Throw "Failed to extract the version information from downloaded file." | |
} | |
$downloadltr = "https://qgis.org/downloads/QGIS-OSGeo4W-$($Details.ltrrelease)-$($Details.ltrbinary).msi" | |
$downloadlatest = "https://qgis.org/downloads/QGIS-OSGeo4W-$($Details.release)-$($Details.msibinary).msi" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment