aboutsummaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'scripts')
-rw-r--r--scripts/fetchDependency.ps115
1 files changed, 10 insertions, 5 deletions
diff --git a/scripts/fetchDependency.ps1 b/scripts/fetchDependency.ps1
index 6024895ae..2ba98ab23 100644
--- a/scripts/fetchDependency.ps1
+++ b/scripts/fetchDependency.ps1
@@ -3,6 +3,16 @@ param(
[string]$Dependency
)
+function Test-Command($commandName)
+{
+ return [bool](Get-Command -Name $commandName -ErrorAction SilentlyContinue)
+}
+
+function Test-Module($moduleName)
+{
+ return [bool](Get-Module -ListAvailable -Name $moduleName)
+}
+
if ($PSVersionTable.PSEdition -ne "Core") {
Import-Module BitsTransfer -Verbose:$false
}
@@ -14,11 +24,6 @@ $vcpkgRootDir = & $scriptsDir\findFileRecursivelyUp.ps1 $scriptsDir .vcpkg-root
$downloadsDir = "$vcpkgRootDir\downloads"
-function Test-Command($commandName)
-{
- return [bool](Get-Command -Name $commandName -ErrorAction SilentlyContinue)
-}
-
function SelectProgram([Parameter(Mandatory=$true)][string]$Dependency)
{
function performDownload( [Parameter(Mandatory=$true)][string]$Dependency,