2021-02-04 19:14:09 +07:00
|
|
|
$dotnetPaths = @{
|
2021-06-28 15:44:40 +07:00
|
|
|
Linux = "/usr/share/dotnet"
|
|
|
|
macOS = "$env:HOME/.dotnet"
|
|
|
|
Windows = "$env:ProgramFiles\dotnet", "$env:LocalAppData\Microsoft\dotnet"
|
2021-02-03 19:13:32 +07:00
|
|
|
}
|
|
|
|
|
2021-06-28 15:44:40 +07:00
|
|
|
foreach ($srcPath in $dotnetPaths[$args[0]]) {
|
|
|
|
if (Test-Path $srcPath) {
|
2024-07-21 05:41:11 +07:00
|
|
|
$dstPath = "$srcPath-" + [IO.Path]::GetRandomFileName()
|
|
|
|
Write-Host "Moving $srcPath to $dstPath"
|
2021-06-28 15:44:40 +07:00
|
|
|
Move-Item -Path $srcPath -Destination $dstPath
|
2021-02-03 19:13:32 +07:00
|
|
|
}
|
2021-02-04 18:24:06 +07:00
|
|
|
}
|