From 2890ffa31c409e1384bdd562f6f5b9fc827a4c14 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Thu, 18 Jan 2018 18:12:14 -0800 Subject: Don't print "downloading..." if file is already downloaded --- scripts/fetchDependency.ps1 | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'scripts') diff --git a/scripts/fetchDependency.ps1 b/scripts/fetchDependency.ps1 index e4cab124c..1ff44c211 100644 --- a/scripts/fetchDependency.ps1 +++ b/scripts/fetchDependency.ps1 @@ -75,9 +75,12 @@ function SelectProgram([Parameter(Mandatory=$true)][string]$Dependency) throw "Unknown program requested" } - Write-Host "Downloading $Dependency..." - vcpkgDownloadFile $url $downloadPath - Write-Host "Downloading $Dependency has completed successfully." + if (!(Test-Path $downloadPath)) + { + Write-Host "Downloading $Dependency..." + vcpkgDownloadFile $url $downloadPath + Write-Host "Downloading $Dependency has completed successfully." + } $downloadedFileHash = vcpkgGetSHA256 $downloadPath vcpkgCheckEqualFileHash -filePath $downloadPath -expectedHash $expectedDownloadedFileHash -actualHash $downloadedFileHash -- cgit v1.2.3