Skip to content

Instantly share code, notes, and snippets.

@cderv
Last active March 30, 2022 08:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cderv/c95da14911b3e71030e9c7b1c4dad329 to your computer and use it in GitHub Desktop.
Save cderv/c95da14911b3e71030e9c7b1c4dad329 to your computer and use it in GitHub Desktop.
Compare hash of Rstudio daily
$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
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