From a5fcfee3f33f95b9ad41f42e6676ef0b579904e5 Mon Sep 17 00:00:00 2001 From: Thomas Schmucker Date: Thu, 27 Aug 2026 13:30:59 +0200 Subject: bootstrap: Weitere Skripte für Windows MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- windows/bin/gmake.cmd | 8 ++------ windows/bin/npm-update.cmd | 3 +++ windows/bin/nvim-update.cmd | 3 --- windows/bin/pkg-update.cmd | 3 +++ windows/bin/system-update.cmd | 10 ++++++++++ zsh/zshrc | 14 +++++--------- 6 files changed, 23 insertions(+), 18 deletions(-) create mode 100644 windows/bin/npm-update.cmd create mode 100644 windows/bin/pkg-update.cmd create mode 100644 windows/bin/system-update.cmd diff --git a/windows/bin/gmake.cmd b/windows/bin/gmake.cmd index 1c45ce5..5f2bad4 100644 --- a/windows/bin/gmake.cmd +++ b/windows/bin/gmake.cmd @@ -1,11 +1,7 @@ @echo off + rem Wrapper, damit opt.makeprg = "gmake" (aus nvim/lua/config/options.lua) -rem unter Windows funktioniert, ohne die bestehende Config anzupassen. -rem Reicht alle Argumente an das im PATH gefundene "make" weiter. -rem -rem Einmalig einrichten: dieses Verzeichnis (windows\bin) zum PATH -rem hinzufuegen, z.B. ueber: -rem setx PATH "%PATH%;%USERPROFILE%\dotfiles\windows\bin" +rem unter Windows funktioniert. make %* exit /b %ERRORLEVEL% diff --git a/windows/bin/npm-update.cmd b/windows/bin/npm-update.cmd new file mode 100644 index 0000000..9152c97 --- /dev/null +++ b/windows/bin/npm-update.cmd @@ -0,0 +1,3 @@ +@echo off + +npm update -g --loglevel=info diff --git a/windows/bin/nvim-update.cmd b/windows/bin/nvim-update.cmd index 7521e7e..5317f34 100644 --- a/windows/bin/nvim-update.cmd +++ b/windows/bin/nvim-update.cmd @@ -1,8 +1,5 @@ @echo off -rem Prüft vor dem Parser-Update, ob ein C-Compiler (cl.exe, MSVC) im PATH -rem gefunden wird - nvim-treesitter braucht ihn zum Kompilieren der Parser. - where /q cl.exe if errorlevel 1 ( echo [nvim-update] cl.exe nicht gefunden - Neovim aus einer "Developer PowerShell for VS" starten. 1>&2 diff --git a/windows/bin/pkg-update.cmd b/windows/bin/pkg-update.cmd new file mode 100644 index 0000000..3747579 --- /dev/null +++ b/windows/bin/pkg-update.cmd @@ -0,0 +1,3 @@ +@echo off + +winget upgrade --all --accept-package-agreements --accept-source-agreements diff --git a/windows/bin/system-update.cmd b/windows/bin/system-update.cmd new file mode 100644 index 0000000..64a7b9f --- /dev/null +++ b/windows/bin/system-update.cmd @@ -0,0 +1,10 @@ +@echo off + +call npm-update.cmd +if errorlevel 1 exit /b 1 + +call nvim-update.cmd +if errorlevel 1 exit /b 1 + +call pkg-update.cmd +if errorlevel 1 exit /b 1 diff --git a/zsh/zshrc b/zsh/zshrc index 4b15a03..acd9ed5 100644 --- a/zsh/zshrc +++ b/zsh/zshrc @@ -81,18 +81,14 @@ alias ls='ls -G' # Funktionen npm-update() { - if (($+commands[npm])); then - npm update -g --loglevel=info - fi + npm update -g --loglevel=info } nvim-update() { - if (($+commands[nvim])); then - nvim --headless \ - -c "lua require[[lazy]].sync({ wait = true })" \ - -c "UpdateParsers" \ - -c "qa" - fi + nvim --headless \ + -c "lua require[[lazy]].sync({ wait = true })" \ + -c "UpdateParsers" \ + -c "qa" } pkg-update() { -- cgit v1.3