forked from dotnet/interactive
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathensure-symlinks.ps1
executable file
·30 lines (23 loc) · 1.55 KB
/
ensure-symlinks.ps1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
function EnsureSymlink([string]$sourceDirectory, [string] $linkName, [string] $destinationLocation) {
Push-Location $sourceDirectory
try {
if (Test-Path $linkName) {
Remove-Item $linkName
}
cmd /c mklink /D $linkName $destinationLocation
if ($LASTEXITCODE -ne 0) {
exit $LASTEXITCODE
}
}
finally {
Pop-Location
}
}
EnsureSymlink -sourceDirectory "$PSScriptRoot\dotnet-interactive-vscode\stable\src" -linkName "common" -destinationLocation "..\..\common"
EnsureSymlink -sourceDirectory "$PSScriptRoot\dotnet-interactive-vscode\stable" -linkName ".vscode" -destinationLocation "..\.vscode"
EnsureSymlink -sourceDirectory "$PSScriptRoot\dotnet-interactive-vscode\insiders\src" -linkName "common" -destinationLocation "..\..\common"
EnsureSymlink -sourceDirectory "$PSScriptRoot\dotnet-interactive-vscode\insiders" -linkName ".vscode" -destinationLocation "..\.vscode"
EnsureSymlink -sourceDirectory "$PSScriptRoot\dotnet-interactive-npm\src" -linkName "common" -destinationLocation "..\..\dotnet-interactive-vscode\common"
EnsureSymlink -sourceDirectory "$PSScriptRoot\dotnet-interactive-npm" -linkName ".vscode" -destinationLocation "..\dotnet-interactive-vscode\.vscode"
EnsureSymlink -sourceDirectory "$PSScriptRoot\Microsoft.DotNet.Interactive.Js\src" -linkName "common" -destinationLocation "..\..\dotnet-interactive-vscode\common"
EnsureSymlink -sourceDirectory "$PSScriptRoot\Microsoft.DotNet.Interactive.Js" -linkName ".vscode" -destinationLocation "..\dotnet-interactive-vscode\.vscode"