
Powershell scripts cannot be launched as commands on Windows. They must be run through the `powershell` or `pwsh` tool.
21 lines
736 B
PowerShell
21 lines
736 B
PowerShell
$erroractionpreference = "stop"
|
|
|
|
$version = "6.2.2-1"
|
|
$sha256sum = "34D5311070678617424628A88C8A7F7BE41157B1A59112F9DFDA1D7EFD4469CC"
|
|
$filename = "innosetup-$version"
|
|
$tarball = "$filename.zip"
|
|
|
|
$outdir = $pwd.Path
|
|
$outdir = "$outdir\.gitlab"
|
|
$ProgressPreference = 'SilentlyContinue'
|
|
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\innosetup"
|
|
Remove-Item "$outdir\$tarball"
|