| 12345678 |
- param([Parameter(Mandatory=$true)][string]$Source,[Parameter(Mandatory=$true)][string]$RemotePartial)
- $ErrorActionPreference='Stop'
- $knownHosts=Join-Path $HOME '.ssh\known_hosts'
- & scp -o StrictHostKeyChecking=yes -o "UserKnownHostsFile=$knownHosts" -o ConnectTimeout=10 `
- $Source "edk2-uefi-lab:$RemotePartial"
- if($LASTEXITCODE -ne 0){throw 'REMOTE_NETWORK_UNSTABLE'}
- $sha=(Get-FileHash -Algorithm SHA256 -LiteralPath $Source).Hash.ToLowerInvariant()
- & "$PSScriptRoot\invoke-remote.ps1" "test \`$(sha256sum '$RemotePartial' | cut -d' ' -f1) = '$sha' && mv '$RemotePartial' '$($RemotePartial -replace '\.partial$','')'"
|