aboutsummaryrefslogtreecommitdiff
path: root/scripts/bootstrap.ps1
diff options
context:
space:
mode:
authorAlexander Karatarakis <alkarata@microsoft.com>2016-09-19 18:46:02 -0700
committerAlexander Karatarakis <alkarata@microsoft.com>2016-09-19 18:52:17 -0700
commitb9a0cee78d01df2a879dee3e4e01800fb3cf3391 (patch)
tree743d3a1175df2105929cf335419c910439ee2204 /scripts/bootstrap.ps1
parent31e7e219211a17b4c133387bfde77861674776f6 (diff)
downloadvcpkg-b9a0cee78d01df2a879dee3e4e01800fb3cf3391.tar.gz
vcpkg-b9a0cee78d01df2a879dee3e4e01800fb3cf3391.zip
Powershell scripts now detect the root dir via the .vcpkg-root file
Diffstat (limited to 'scripts/bootstrap.ps1')
-rw-r--r--scripts/bootstrap.ps110
1 files changed, 5 insertions, 5 deletions
diff --git a/scripts/bootstrap.ps1 b/scripts/bootstrap.ps1
index d336dc9d5..182155146 100644
--- a/scripts/bootstrap.ps1
+++ b/scripts/bootstrap.ps1
@@ -4,13 +4,13 @@ param(
[string]$disableMetrics = "0"
)
-$scriptsdir = split-path -parent $MyInvocation.MyCommand.Definition
-$vcpkgRoot = Split-path $scriptsdir -Parent
+$scriptsDir = split-path -parent $MyInvocation.MyCommand.Definition
+$vcpkgRootDir = & $scriptsDir\findFileRecursivelyUp.ps1 $scriptsDir .vcpkg-root
$gitHash = git rev-parse HEAD
Write-Verbose("Git hash is " + $gitHash)
$gitStartOfHash = $gitHash.substring(0,6)
-$vcpkgSourcesPath = "$vcpkgRoot\toolsrc"
+$vcpkgSourcesPath = "$vcpkgRootDir\toolsrc"
Write-Verbose("vcpkg Path " + $vcpkgSourcesPath)
if (!(Test-Path $vcpkgSourcesPath))
@@ -24,8 +24,8 @@ try{
Write-Verbose("Placing vcpkg.exe in the correct location")
- Copy-Item $vcpkgSourcesPath\Release\vcpkg.exe $vcpkgRoot\vcpkg.exe | Out-Null
- Copy-Item $vcpkgSourcesPath\Release\vcpkgmetricsuploader.exe $vcpkgRoot\scripts\vcpkgmetricsuploader.exe | Out-Null
+ Copy-Item $vcpkgSourcesPath\Release\vcpkg.exe $vcpkgRootDir\vcpkg.exe | Out-Null
+ Copy-Item $vcpkgSourcesPath\Release\vcpkgmetricsuploader.exe $vcpkgRootDir\scripts\vcpkgmetricsuploader.exe | Out-Null
}
finally{
popd