aboutsummaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorAlexander Karatarakis <alkarata@microsoft.com>2018-02-22 19:56:08 -0800
committerAlexander Karatarakis <alkarata@microsoft.com>2018-02-23 18:19:04 -0800
commitf0cee21f7a11c9c2073616e199b412d6fb2a364d (patch)
tree60a07454462672a0682b8fd25738036727bf28f6 /scripts
parent31b27eaa1b29c856ffc16b0560a44491d27bea01 (diff)
downloadvcpkg-f0cee21f7a11c9c2073616e199b412d6fb2a364d.tar.gz
vcpkg-f0cee21f7a11c9c2073616e199b412d6fb2a364d.zip
[vcpkgDependencies.xml] Reuse in bootstrap
Diffstat (limited to 'scripts')
-rw-r--r--scripts/bootstrap.ps19
1 files changed, 8 insertions, 1 deletions
diff --git a/scripts/bootstrap.ps1 b/scripts/bootstrap.ps1
index eb4513a64..9ee2d1643 100644
--- a/scripts/bootstrap.ps1
+++ b/scripts/bootstrap.ps1
@@ -14,7 +14,13 @@ $gitHash = "unknownhash"
$oldpath = $env:path
try
{
- $env:path += ";$vcpkgRootDir\downloads\MinGit-2.16.2-32-bit\cmd"
+ [xml]$asXml = Get-Content "$scriptsDir\vcpkgDependencies.xml"
+ $dependencyData = $asXml.SelectSingleNode("//dependencies/dependency[@name=`"git`"]")
+ $postExtractionExecutableRelativePath = $dependencyData.postExtractionExecutableRelativePath
+ $gitFromDownload = "$vcpkgRootDir\downloads\$postExtractionExecutableRelativePath"
+ $gitDir = split-path -parent $gitFromDownload
+
+ $env:path += ";$gitDir"
if (Get-Command "git" -ErrorAction SilentlyContinue)
{
$gitHash = git log HEAD -n 1 --format="%cd-%H" --date=short
@@ -29,6 +35,7 @@ finally
$env:path = $oldpath
}
Write-Verbose("Git repo version string is " + $gitHash)
+
$vcpkgSourcesPath = "$vcpkgRootDir\toolsrc"
if (!(Test-Path $vcpkgSourcesPath))