|
|
@ -0,0 +1,21 @@ |
|
|
|
$erroractionpreference = "stop" |
|
|
|
|
|
|
|
$version = "6.9.1.3" |
|
|
|
$sha256sum = "562A2CE2D570D68DB4472CB82CDF1FC4245D5C73B84BC8361880CBE389702F65" |
|
|
|
$filename = "nuget-$version-win-i386-1" |
|
|
|
$tarball = "$filename.zip" |
|
|
|
|
|
|
|
$outdir = $pwd.Path |
|
|
|
$outdir = "$outdir\.gitlab" |
|
|
|
$ProgressPreference = 'SilentlyContinue' |
|
|
|
# This URL is only visible inside of Kitware's network. |
|
|
|
Invoke-WebRequest -Uri "https://cmake.org/files/dependencies/internal/$tarball" -OutFile "$outdir\$tarball" |
|
|
|
$hash = Get-FileHash "$outdir\$tarball" -Algorithm SHA256 |
|
|
|
if ($hash.Hash -ne $sha256sum) { |
|
|
|
exit 1 |
|
|
|
} |
|
|
|
|
|
|
|
Add-Type -AssemblyName System.IO.Compression.FileSystem |
|
|
|
[System.IO.Compression.ZipFile]::ExtractToDirectory("$outdir\$tarball", "$outdir") |
|
|
|
Move-Item -Path "$outdir\$filename" -Destination "$outdir\nuget" |
|
|
|
Remove-Item "$outdir\$tarball" |