@echo off setlocal cd /d "%~dp0" echo Baue Debian Application Package via WSL... where wsl >nul 2>nul if errorlevel 1 goto wsl_missing set "WSL_CWD=" for /f "delims=" %%i in ('wsl wslpath -a "%CD%" 2^>nul') do set "WSL_CWD=%%i" if "%WSL_CWD%"=="" goto wsl_path_error if not "%WSL_CWD:~0,1%"=="/" goto wsl_missing wsl bash -lc "cd ""%WSL_CWD%"" && bash ./build_deb.sh" if errorlevel 1 goto error echo. echo Debian-Paket erfolgreich gebaut. goto end :wsl_missing echo. echo Debian-Paket-Build braucht eine installierte WSL-Linux-Distribution. echo Einmalig installieren, z.B.: echo wsl --install -d Debian exit /b 1 :wsl_path_error echo. echo WSL-Pfad konnte nicht aus dem Windows-Pfad erzeugt werden: echo %CD% exit /b 1 :error echo. echo Debian-Paket-Build fehlgeschlagen. exit /b 1 :end endlocal exit /b 0