summaryrefslogtreecommitdiff
path: root/src/mongo/gotools/set_gopath.ps1
blob: 87f7dda2435887bb9349330482ee345a22521120 (plain)
1
2
3
4
5
6
7
8
9
$goPath = "${pwd}\.gopath"
$vendorPath = "${pwd}\vendor"

# Using cmd invocation to recursively delete directories because Remove-Item -Recurse -Force 
# has a bug causing the script to fail.
Invoke-Expression "cmd /c rd /s /q $goPath"
New-Item $goPath\src\github.com\mongodb -ItemType Container | Out-Null
Invoke-Expression "cmd /c mklink /J $goPath\src\github.com\mongodb\mongo-tools ${pwd}" | Out-Null
$env:GOPATH = "$goPath;$vendorPath"