aboutsummaryrefslogtreecommitdiff
path: root/install-win.ps1
diff options
context:
space:
mode:
Diffstat (limited to 'install-win.ps1')
-rw-r--r--install-win.ps117
1 files changed, 17 insertions, 0 deletions
diff --git a/install-win.ps1 b/install-win.ps1
index 41b3b51..632c25e 100644
--- a/install-win.ps1
+++ b/install-win.ps1
@@ -80,14 +80,31 @@ function Copy-Npmrc {
80 Write-Ok $NpmrcDst 80 Write-Ok $NpmrcDst
81} 81}
82 82
83function Add-BinToUserPath {
84 $binDir = Join-Path $RepoRoot "windows\bin"
85 $userPath = [Environment]::GetEnvironmentVariable("PATH", "User")
86 $entries = $userPath -split ";"
87
88 if ($entries -contains $binDir) {
89 Write-SkipMsg "$binDir bereits im User-PATH"
90 return
91 }
92
93 Write-Step "$binDir zum User-PATH hinzufuegen (enthaelt gmake.cmd)"
94 [Environment]::SetEnvironmentVariable("PATH", "$userPath;$binDir", "User")
95 Write-Ok "$binDir (wirkt erst in neuen Terminal-Sitzungen)"
96}
97
83function Main { 98function Main {
84 Copy-NvimConfig 99 Copy-NvimConfig
85 Copy-GitConfig 100 Copy-GitConfig
86 Copy-Npmrc 101 Copy-Npmrc
102 Add-BinToUserPath
87 103
88 Write-Host "" 104 Write-Host ""
89 Write-Host "Fertig. Dateien wurden KOPIERT, nicht verlinkt." -ForegroundColor Green 105 Write-Host "Fertig. Dateien wurden KOPIERT, nicht verlinkt." -ForegroundColor Green
90 Write-Host "Nach Aenderungen im Repo dieses Skript erneut ausfuehren." 106 Write-Host "Nach Aenderungen im Repo dieses Skript erneut ausfuehren."
107 Write-Host "Neues Terminal oeffnen, damit PATH-Aenderungen wirksam werden." -ForegroundColor Yellow
91} 108}
92 109
93Main 110Main