diff options
| author | Thomas Schmucker <ts@its1.de> | 2026-07-23 10:00:34 +0200 |
|---|---|---|
| committer | Thomas Schmucker <ts@its1.de> | 2026-07-23 10:00:34 +0200 |
| commit | b504e16f941470d46c0f8495f7ea4368e5d14871 (patch) | |
| tree | b920a22930ec8bd158225e10eb4e20e428e8474d /bootstrap | |
| parent | fe4db25063224c51f9970f2f41d355f60d751b1b (diff) | |
| download | dotfiles-b504e16f941470d46c0f8495f7ea4368e5d14871.tar.gz dotfiles-b504e16f941470d46c0f8495f7ea4368e5d14871.tar.bz2 dotfiles-b504e16f941470d46c0f8495f7ea4368e5d14871.zip | |
windows: install-win.cmd durch install-win.ps1 ersetzt, neovim-dict-win.ps1 ergaenzt
install-win.cmd entfernt, install-win.ps1 (reines PowerShell) uebernimmt
dieselbe Aufgabe (Config-Kopie nach %LOCALAPPDATA%\nvim, .gitconfig,
config-up2parts, npmrc). Ausserdem bootstrap/neovim-dict-win.ps1 als
PowerShell-Pendant zu bootstrap/neovim-dict.sh: laedt die deutschen
Rechtschreib-Woerterbuecher nach %LOCALAPPDATA%\nvim-data\site\spell.
neovim-windows-setup.md aktualisiert: verweist jetzt durchgehend auf
die .ps1-Skripte statt .cmd/Git-Bash, Python-Installationsschritt
entfernt (Provider ist deaktiviert), Stolperstein-Liste bereinigt.
Diffstat (limited to 'bootstrap')
| -rw-r--r-- | bootstrap/neovim-dict-win.ps1 | 64 |
1 files changed, 64 insertions, 0 deletions
diff --git a/bootstrap/neovim-dict-win.ps1 b/bootstrap/neovim-dict-win.ps1 new file mode 100644 index 0000000..6c0c710 --- /dev/null +++ b/bootstrap/neovim-dict-win.ps1 | |||
| @@ -0,0 +1,64 @@ | |||
| 1 | #Requires -Version 5.1 | ||
| 2 | <# | ||
| 3 | Windows-natives Pendant zu bootstrap/neovim-dict.sh. | ||
| 4 | Laedt die deutschen Rechtschreib-Woerterbuecher fuer Neovim herunter. | ||
| 5 | bootstrap/neovim-dict.sh bleibt unveraendert. | ||
| 6 | |||
| 7 | Aufruf: | ||
| 8 | .\bootstrap\neovim-dict-win.ps1 | ||
| 9 | |||
| 10 | Falls die Ausfuehrung durch die Execution Policy blockiert wird: | ||
| 11 | powershell -ExecutionPolicy Bypass -File .\bootstrap\neovim-dict-win.ps1 | ||
| 12 | #> | ||
| 13 | |||
| 14 | $ErrorActionPreference = "Stop" | ||
| 15 | |||
| 16 | function Write-Ok($msg) { | ||
| 17 | Write-Host "OK $msg" -ForegroundColor Green | ||
| 18 | } | ||
| 19 | |||
| 20 | function Write-Step($msg) { | ||
| 21 | Write-Host "==> $msg" -ForegroundColor Cyan | ||
| 22 | } | ||
| 23 | |||
| 24 | function Write-SkipMsg($msg) { | ||
| 25 | Write-Host "- $msg bereits vorhanden" -ForegroundColor DarkGray | ||
| 26 | } | ||
| 27 | |||
| 28 | # Nativer Windows-Datenpfad von Neovim (kein XDG_DATA_HOME gesetzt): | ||
| 29 | # $env:LOCALAPPDATA\nvim-data\site\spell | ||
| 30 | $SpellDir = Join-Path $env:LOCALAPPDATA "nvim-data\site\spell" | ||
| 31 | |||
| 32 | $Urls = @( | ||
| 33 | "https://ftp.nluug.nl/pub/vim/runtime/spell/de.utf-8.spl", | ||
| 34 | "https://ftp.nluug.nl/pub/vim/runtime/spell/de.utf-8.sug" | ||
| 35 | ) | ||
| 36 | |||
| 37 | function Get-SpellFile([string]$Url) { | ||
| 38 | $fileName = Split-Path -Leaf $Url | ||
| 39 | $dest = Join-Path $SpellDir $fileName | ||
| 40 | |||
| 41 | if (Test-Path $dest) { | ||
| 42 | Write-SkipMsg $fileName | ||
| 43 | return | ||
| 44 | } | ||
| 45 | |||
| 46 | Write-Step "Lade $fileName herunter" | ||
| 47 | Invoke-WebRequest -Uri $Url -OutFile $dest | ||
| 48 | Write-Ok $fileName | ||
| 49 | } | ||
| 50 | |||
| 51 | function Main { | ||
| 52 | if (-not (Test-Path $SpellDir)) { | ||
| 53 | New-Item -ItemType Directory -Path $SpellDir -Force | Out-Null | ||
| 54 | } | ||
| 55 | |||
| 56 | foreach ($url in $Urls) { | ||
| 57 | Get-SpellFile $url | ||
| 58 | } | ||
| 59 | |||
| 60 | Write-Host "" | ||
| 61 | Write-Host "Woerterbuecher fuer Neovim installiert!" -ForegroundColor Green | ||
| 62 | } | ||
| 63 | |||
| 64 | Main | ||
