refactor and rename scripts
This commit is contained in:
-10
@@ -4,19 +4,9 @@ $dotnetPath = "$env:USERPROFILE\.dotnet\tools"
|
|||||||
if ($latestPath.Contains("C:\Users\VssAdministrator\.dotnet\tools"))
|
if ($latestPath.Contains("C:\Users\VssAdministrator\.dotnet\tools"))
|
||||||
{
|
{
|
||||||
$latestPath = $latestPath.Replace("C:\Users\VssAdministrator\.dotnet\tools", "$dotnetPath")
|
$latestPath = $latestPath.Replace("C:\Users\VssAdministrator\.dotnet\tools", "$dotnetPath")
|
||||||
$isPathUpdated = $true
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (-not $latestPath.Contains($dotnetPath))
|
if (-not $latestPath.Contains($dotnetPath))
|
||||||
{
|
{
|
||||||
$latestPath = "$dotnetPath;$latestPath"
|
$latestPath = "$dotnetPath;$latestPath"
|
||||||
Write-Host "Added .dotnet\tools $dotnetPath to PATH"
|
|
||||||
$isPathUpdated = $true
|
|
||||||
}
|
}
|
||||||
else
|
|
||||||
{
|
|
||||||
Write-Host "$dotnetPath already in PATH"
|
|
||||||
}
|
|
||||||
|
|
||||||
$updatedPath = [System.Environment]::GetEnvironmentVariable('PATH', [System.EnvironmentVariableTarget]::Machine)
|
|
||||||
Write-Host "Windows PATH: $updatedPath"
|
|
||||||
@@ -0,0 +1,8 @@
|
|||||||
|
$hgPath = "$Env:ProgramFiles\Mercurial\"
|
||||||
|
$latestPath = [System.Environment]::GetEnvironmentVariable('PATH', [System.EnvironmentVariableTarget]::Machine)
|
||||||
|
|
||||||
|
if (Test-Path -Path $hgPath)
|
||||||
|
{
|
||||||
|
$latestPath = "$hgPath;$latestPath"
|
||||||
|
Write-Host "Added Mercurial to PATH"
|
||||||
|
}
|
||||||
@@ -1,16 +0,0 @@
|
|||||||
$hgPath = "$Env:ProgramFiles\Mercurial\"
|
|
||||||
$latestPath = [System.Environment]::GetEnvironmentVariable('PATH', [System.EnvironmentVariableTarget]::Machine)
|
|
||||||
|
|
||||||
if (Test-Path -Path $hgPath)
|
|
||||||
{
|
|
||||||
$latestPath = "$hgPath;$latestPath"
|
|
||||||
Write-Host "Added Mercurial to PATH"
|
|
||||||
$isPathUpdated = $true
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
Write-Host "Didn't find Mercurial at $hgPath. Skipping adding PATH to it."
|
|
||||||
}
|
|
||||||
|
|
||||||
$updatedPath = [System.Environment]::GetEnvironmentVariable('PATH', [System.EnvironmentVariableTarget]::Machine)
|
|
||||||
Write-Host "Windows PATH: $updatedPath"
|
|
||||||
Reference in New Issue
Block a user