update script change

This commit is contained in:
Frank Skare
2019-11-17 14:49:42 +01:00
parent 3844db6e79
commit 660345d18a

View File

@@ -5,11 +5,11 @@ $targetFile = $targetDir + '.7z'
Write-Host 'Download new version' -ForegroundColor Green
curl.exe $args[0] --location --output $targetFile
if (-not $?) { throw "curl error: $LastExitCode" }
if ($LastExitCode) { throw $LastExitCode }
Write-Host 'Unpack new version' -ForegroundColor Green
& ($args[1] + '\7z\7za.exe') x -y $targetFile -o"$targetDir"
if (-not $?) { throw "7zip error: $LastExitCode" }
if ($LastExitCode) { throw $LastExitCode }
Write-Host 'Delete downloaded file' -ForegroundColor Green
Remove-Item $targetFile -Force -Recurse