From 6e5882a2fd02d30206ab9ca8aa5847b8ea09196c Mon Sep 17 00:00:00 2001 From: Thomas Schmucker Date: Wed, 12 Aug 2026 09:19:03 +0200 Subject: Normalize line endings --- bootstrap-win/neovim-dict.ps1 | 116 +++++++++++++++++++++--------------------- 1 file changed, 58 insertions(+), 58 deletions(-) (limited to 'bootstrap-win/neovim-dict.ps1') diff --git a/bootstrap-win/neovim-dict.ps1 b/bootstrap-win/neovim-dict.ps1 index 5aeb117..0068a5e 100644 --- a/bootstrap-win/neovim-dict.ps1 +++ b/bootstrap-win/neovim-dict.ps1 @@ -1,58 +1,58 @@ -#Requires -Version 5.1 -<# - Windows-natives Pendant zu bootstrap/neovim-dict.sh. - Laedt die deutschen Rechtschreib-Woerterbuecher fuer Neovim herunter. - - Aufruf: - .\bootstrap-win\neovim-dict.ps1 -#> - -$ErrorActionPreference = "Stop" - -function Write-Ok($msg) { - Write-Host "OK $msg" -ForegroundColor Green -} - -function Write-Step($msg) { - Write-Host "==> $msg" -ForegroundColor Cyan -} - -function Write-SkipMsg($msg) { - Write-Host "- $msg bereits vorhanden" -ForegroundColor DarkGray -} - -$SpellDir = Join-Path $env:LOCALAPPDATA "nvim-data\site\spell" - -$Urls = @( - "https://ftp.nluug.nl/pub/vim/runtime/spell/de.utf-8.spl", - "https://ftp.nluug.nl/pub/vim/runtime/spell/de.utf-8.sug" -) - -function Get-SpellFile([string]$Url) { - $fileName = Split-Path -Leaf $Url - $dest = Join-Path $SpellDir $fileName - - if (Test-Path $dest) { - Write-SkipMsg $fileName - return - } - - Write-Step "Lade $fileName herunter" - Invoke-WebRequest -Uri $Url -OutFile $dest - Write-Ok $fileName -} - -function Main { - if (-not (Test-Path $SpellDir)) { - New-Item -ItemType Directory -Path $SpellDir -Force | Out-Null - } - - foreach ($url in $Urls) { - Get-SpellFile $url - } - - Write-Host "" - Write-Host "Woerterbuecher fuer Neovim installiert!" -ForegroundColor Green -} - -Main +#Requires -Version 5.1 +<# + Windows-natives Pendant zu bootstrap/neovim-dict.sh. + Laedt die deutschen Rechtschreib-Woerterbuecher fuer Neovim herunter. + + Aufruf: + .\bootstrap-win\neovim-dict.ps1 +#> + +$ErrorActionPreference = "Stop" + +function Write-Ok($msg) { + Write-Host "OK $msg" -ForegroundColor Green +} + +function Write-Step($msg) { + Write-Host "==> $msg" -ForegroundColor Cyan +} + +function Write-SkipMsg($msg) { + Write-Host "- $msg bereits vorhanden" -ForegroundColor DarkGray +} + +$SpellDir = Join-Path $env:LOCALAPPDATA "nvim-data\site\spell" + +$Urls = @( + "https://ftp.nluug.nl/pub/vim/runtime/spell/de.utf-8.spl", + "https://ftp.nluug.nl/pub/vim/runtime/spell/de.utf-8.sug" +) + +function Get-SpellFile([string]$Url) { + $fileName = Split-Path -Leaf $Url + $dest = Join-Path $SpellDir $fileName + + if (Test-Path $dest) { + Write-SkipMsg $fileName + return + } + + Write-Step "Lade $fileName herunter" + Invoke-WebRequest -Uri $Url -OutFile $dest + Write-Ok $fileName +} + +function Main { + if (-not (Test-Path $SpellDir)) { + New-Item -ItemType Directory -Path $SpellDir -Force | Out-Null + } + + foreach ($url in $Urls) { + Get-SpellFile $url + } + + Write-Host "" + Write-Host "Woerterbuecher fuer Neovim installiert!" -ForegroundColor Green +} + +Main -- cgit v1.3