Last active
March 30, 2022 08:57
-
-
Save cderv/c95da14911b3e71030e9c7b1c4dad329 to your computer and use it in GitHub Desktop.
Compare hash of Rstudio daily
This file contains hidden or 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
$wc = [System.Net.WebClient]::new() | |
$pkgurl = $(curl -s https://dailies.rstudio.com/rstudio/latest/index.json | jq -r '.products.desktop.platforms[\"windows-xcopy\"].link') | |
$pkgurl | |
$publishedHash = $(curl -s https://dailies.rstudio.com/rstudio/latest/index.json | jq -r '.products.desktop.platforms[\"windows-xcopy\"].sha256') | |
$publishedHash | |
$FileHash = Get-FileHash -InputStream ($wc.OpenRead($pkgurl)) | |
$FileHash.Hash -eq $publishedHash | |
$FileHash.Hash | |
$publishedHash |
This file contains hidden or 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
pkgurl=$(curl -s https://dailies.rstudio.com/rstudio/latest/index.json | jq -r '.products.desktop.platforms["windows-xcopy"].link') | |
echo $pkgurl | |
publishedHash=$(curl -s https://dailies.rstudio.com/rstudio/latest/index.json | jq -r '.products.desktop.platforms["windows-xcopy"].sha256') | |
curl $pkurl | sha256sum |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment