Overwriting dlls in the destination output directory when the source … (#4796)

* Overwriting dlls in the destination output directory when the source is newer.

* [vcpkg] cleanup whitespace
This commit is contained in:
SvenPStarFinanz 2019-02-28 22:52:51 +01:00 committed by Phil Christensen
parent d236aa6f0a
commit 7859944528

View File

@ -15,7 +15,14 @@ if ($copiedFilesLog)
# Note: this function signature is depended upon by the qtdeploy.ps1 script introduced in 5.7.1-7 # Note: this function signature is depended upon by the qtdeploy.ps1 script introduced in 5.7.1-7
function deployBinary([string]$targetBinaryDir, [string]$SourceDir, [string]$targetBinaryName) { function deployBinary([string]$targetBinaryDir, [string]$SourceDir, [string]$targetBinaryName) {
if (Test-Path "$targetBinaryDir\$targetBinaryName") { if (Test-Path "$targetBinaryDir\$targetBinaryName") {
Write-Verbose " ${targetBinaryName}: already present" $sourceModTime = (Get-Item $SourceDir\$targetBinaryName).LastWriteTime
$destModTime = (Get-Item $targetBinaryDir\$targetBinaryName).LastWriteTime
if ($destModTime -lt $sourceModTime) {
Write-Verbose " ${targetBinaryName}: Updating $SourceDir\$targetBinaryName"
Copy-Item "$SourceDir\$targetBinaryName" $targetBinaryDir
} else {
Write-Verbose " ${targetBinaryName}: already present"
}
} }
else { else {
Write-Verbose " ${targetBinaryName}: Copying $SourceDir\$targetBinaryName" Write-Verbose " ${targetBinaryName}: Copying $SourceDir\$targetBinaryName"