Skip to content

Commit

Permalink
修正
Browse files Browse the repository at this point in the history
  • Loading branch information
kitUIN committed Jul 10, 2024
1 parent 2fb09f7 commit 016f982
Showing 1 changed file with 13 additions and 11 deletions.
24 changes: 13 additions & 11 deletions link.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -15,18 +15,20 @@ $prefix = "fabric"

function Create-SymbolicLink {
param($target, $path, $source)
if (Test-Path $source) {
$fullPath = Join-Path -Path $target -ChildPath $path
if (Test-Path $fullPath) {
Remove-Item $fullPath -Recurse
}
if ($ci) {
Copy-Item $source -Destination $fullPath -Force -Recurse
}
else{
New-Item -ItemType SymbolicLink -Path $fullPath -Target $source
}
$fullPath = Join-Path -Path $target -ChildPath $path
if (-not (Test-Path $fullPath)) {
New-Item -ItemType Directory -Force -Path $fullPath
}
if (Test-Path $fullPath) {
Remove-Item $fullPath -Recurse
}
if ($ci) {
Copy-Item $source -Destination $fullPath -Force -Recurse
}
else{
New-Item -ItemType SymbolicLink -Path $fullPath -Target $source
}

}


Expand Down

0 comments on commit 016f982

Please sign in to comment.