diff options
| author | Thomas Schmucker <ts@its1.de> | 2026-07-23 10:20:06 +0200 |
|---|---|---|
| committer | Thomas Schmucker <ts@its1.de> | 2026-07-23 10:20:06 +0200 |
| commit | c196e9a59a47bcaceab93342af5cf7a2f6ddd853 (patch) | |
| tree | 79d23bf9cf9f95811f07d951a5e6ca6ae31e9af7 /install-win.ps1 | |
| parent | bb70769ffdc3b93329f364f47c49148658a03d44 (diff) | |
| download | dotfiles-c196e9a59a47bcaceab93342af5cf7a2f6ddd853.tar.gz dotfiles-c196e9a59a47bcaceab93342af5cf7a2f6ddd853.tar.bz2 dotfiles-c196e9a59a47bcaceab93342af5cf7a2f6ddd853.zip | |
windows: manuelle Schritte reduzieren (PATH-Refresh, windows/bin automatisch im PATH)
bootstrap/neovim-win.ps1: Update-SessionPath liest PATH nach der
Git/Node-Installation aus der Registry neu ein, damit die folgenden
npm-Installationen (Formatters/LSP) im selben Lauf nicht faelschlich
'npm nicht gefunden' melden.
install-win.ps1: haengt windows/bin (gmake.cmd) automatisch und
idempotent an den User-PATH an, statt das manuell per Anleitung zu
verlangen.
Diffstat (limited to 'install-win.ps1')
| -rw-r--r-- | install-win.ps1 | 17 |
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 | ||
| 83 | function 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 | |||
| 83 | function Main { | 98 | function 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 | ||
| 93 | Main | 110 | Main |
